OSDN Git Service

de71541169af08ad1e8f6a976b6ed0360835a480
[mikumikustudio/MikuMikuStudio.git] / src / com / jmex / model / collada / schema / gl_stencil_op_type.java
1 /**\r
2  * gl_stencil_op_type.java\r
3  *\r
4  * This file was generated by XMLSpy 2007sp2 Enterprise Edition.\r
5  *\r
6  * YOU SHOULD NOT MODIFY THIS FILE, BECAUSE IT WILL BE\r
7  * OVERWRITTEN WHEN YOU RE-RUN CODE GENERATION.\r
8  *\r
9  * Refer to the XMLSpy Documentation for further details.\r
10  * http://www.altova.com/xmlspy\r
11  */\r
12 \r
13 \r
14 package com.jmex.model.collada.schema;\r
15 \r
16 import com.jmex.xml.types.SchemaString;\r
17 \r
18 public class gl_stencil_op_type extends SchemaString {\r
19         public static final int EKEEP = 0; /* KEEP */\r
20         public static final int EZERO = 1; /* ZERO */\r
21         public static final int EREPLACE = 2; /* REPLACE */\r
22         public static final int EINCR = 3; /* INCR */\r
23         public static final int EDECR = 4; /* DECR */\r
24         public static final int EINVERT = 5; /* INVERT */\r
25         public static final int EINCR_WRAP = 6; /* INCR_WRAP */\r
26         public static final int EDECR_WRAP = 7; /* DECR_WRAP */\r
27 \r
28         public static String[] sEnumValues = {\r
29                 "KEEP",\r
30                 "ZERO",\r
31                 "REPLACE",\r
32                 "INCR",\r
33                 "DECR",\r
34                 "INVERT",\r
35                 "INCR_WRAP",\r
36                 "DECR_WRAP",\r
37         };\r
38 \r
39         public gl_stencil_op_type() {\r
40                 super();\r
41         }\r
42 \r
43         public gl_stencil_op_type(String newValue) {\r
44                 super(newValue);\r
45                 validate();\r
46         }\r
47 \r
48         public gl_stencil_op_type(SchemaString newValue) {\r
49                 super(newValue);\r
50                 validate();\r
51         }\r
52 \r
53         public static int getEnumerationCount() {\r
54                 return sEnumValues.length;\r
55         }\r
56 \r
57         public static String getEnumerationValue(int index) {\r
58                 return sEnumValues[index];\r
59         }\r
60 \r
61         public static boolean isValidEnumerationValue(String val) {\r
62                 for (int i = 0; i < sEnumValues.length; i++) {\r
63                         if (val.equals(sEnumValues[i]))\r
64                                 return true;\r
65                 }\r
66                 return false;\r
67         }\r
68 \r
69         public void validate() {\r
70 \r
71                 if (!isValidEnumerationValue(toString()))\r
72                         throw new com.jmex.xml.xml.XmlException("Value of gl_stencil_op_type is invalid.");\r
73         }\r
74 }\r