OSDN Git Service

9b1cfced62823248d23f714c532bac08646c8ca1
[mikumikustudio/MikuMikuStudio.git] / src / com / jmex / model / collada / schema / fx_surface_format_hint_channels_enum.java
1 /**\r
2  * fx_surface_format_hint_channels_enum.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 fx_surface_format_hint_channels_enum extends SchemaString {\r
19         public static final int ERGB = 0; /* RGB */\r
20         public static final int ERGBA = 1; /* RGBA */\r
21         public static final int EL = 2; /* L */\r
22         public static final int ELA = 3; /* LA */\r
23         public static final int ED = 4; /* D */\r
24         public static final int EXYZ = 5; /* XYZ */\r
25         public static final int EXYZW = 6; /* XYZW */\r
26 \r
27         public static String[] sEnumValues = {\r
28                 "RGB",\r
29                 "RGBA",\r
30                 "L",\r
31                 "LA",\r
32                 "D",\r
33                 "XYZ",\r
34                 "XYZW",\r
35         };\r
36 \r
37         public fx_surface_format_hint_channels_enum() {\r
38                 super();\r
39         }\r
40 \r
41         public fx_surface_format_hint_channels_enum(String newValue) {\r
42                 super(newValue);\r
43                 validate();\r
44         }\r
45 \r
46         public fx_surface_format_hint_channels_enum(SchemaString newValue) {\r
47                 super(newValue);\r
48                 validate();\r
49         }\r
50 \r
51         public static int getEnumerationCount() {\r
52                 return sEnumValues.length;\r
53         }\r
54 \r
55         public static String getEnumerationValue(int index) {\r
56                 return sEnumValues[index];\r
57         }\r
58 \r
59         public static boolean isValidEnumerationValue(String val) {\r
60                 for (int i = 0; i < sEnumValues.length; i++) {\r
61                         if (val.equals(sEnumValues[i]))\r
62                                 return true;\r
63                 }\r
64                 return false;\r
65         }\r
66 \r
67         public void validate() {\r
68 \r
69                 if (!isValidEnumerationValue(toString()))\r
70                         throw new com.jmex.xml.xml.XmlException("Value of fx_surface_format_hint_channels_enum is invalid.");\r
71         }\r
72 }\r