OSDN Git Service

a9b6ef09893b687950c3b9fbd6ab2452bac6f6f4
[mikumikustudio/MikuMikuStudio.git] / src / com / jmex / model / collada / schema / gles_stencil_op_type.java
1 /**\r
2  * gles_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 gles_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 \r
26         public static String[] sEnumValues = {\r
27                 "KEEP",\r
28                 "ZERO",\r
29                 "REPLACE",\r
30                 "INCR",\r
31                 "DECR",\r
32                 "INVERT",\r
33         };\r
34 \r
35         public gles_stencil_op_type() {\r
36                 super();\r
37         }\r
38 \r
39         public gles_stencil_op_type(String newValue) {\r
40                 super(newValue);\r
41                 validate();\r
42         }\r
43 \r
44         public gles_stencil_op_type(SchemaString newValue) {\r
45                 super(newValue);\r
46                 validate();\r
47         }\r
48 \r
49         public static int getEnumerationCount() {\r
50                 return sEnumValues.length;\r
51         }\r
52 \r
53         public static String getEnumerationValue(int index) {\r
54                 return sEnumValues[index];\r
55         }\r
56 \r
57         public static boolean isValidEnumerationValue(String val) {\r
58                 for (int i = 0; i < sEnumValues.length; i++) {\r
59                         if (val.equals(sEnumValues[i]))\r
60                                 return true;\r
61                 }\r
62                 return false;\r
63         }\r
64 \r
65         public void validate() {\r
66 \r
67                 if (!isValidEnumerationValue(toString()))\r
68                         throw new com.jmex.xml.xml.XmlException("Value of gles_stencil_op_type is invalid.");\r
69         }\r
70 }\r