2 * This class was automatically generated with
3 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
8 package jalview.schemabinding.version2.types;
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
14 import java.util.Hashtable;
17 * Class ColourThreshTypeType.
19 * @version $Revision$ $Date$
21 public class ColourThreshTypeType implements java.io.Serializable {
24 //--------------------------/
25 //- Class/Member Variables -/
26 //--------------------------/
31 public static final int NONE_TYPE = 0;
34 * The instance of the NONE type
36 public static final ColourThreshTypeType NONE = new ColourThreshTypeType(NONE_TYPE, "NONE");
41 public static final int ABOVE_TYPE = 1;
44 * The instance of the ABOVE type
46 public static final ColourThreshTypeType ABOVE = new ColourThreshTypeType(ABOVE_TYPE, "ABOVE");
51 public static final int BELOW_TYPE = 2;
54 * The instance of the BELOW type
56 public static final ColourThreshTypeType BELOW = new ColourThreshTypeType(BELOW_TYPE, "BELOW");
61 private static java.util.Hashtable _memberTable = init();
66 private int type = -1;
71 private java.lang.String stringValue = null;
78 private ColourThreshTypeType(final int type, final java.lang.String value) {
81 this.stringValue = value;
90 * Method enumerate.Returns an enumeration of all possible
91 * instances of ColourThreshTypeType
93 * @return an Enumeration over all possible instances of
94 * ColourThreshTypeType
96 public static java.util.Enumeration enumerate(
98 return _memberTable.elements();
102 * Method getType.Returns the type of this ColourThreshTypeType
104 * @return the type of this ColourThreshTypeType
114 * @return the initialized Hashtable for the member table
116 private static java.util.Hashtable init(
118 Hashtable members = new Hashtable();
119 members.put("NONE", NONE);
120 members.put("ABOVE", ABOVE);
121 members.put("BELOW", BELOW);
126 * Method readResolve. will be called during deserialization to
127 * replace the deserialized object with the correct constant
130 * @return this deserialized object
132 private java.lang.Object readResolve(
134 return valueOf(this.stringValue);
138 * Method toString.Returns the String representation of this
139 * ColourThreshTypeType
141 * @return the String representation of this ColourThreshTypeTyp
143 public java.lang.String toString(
145 return this.stringValue;
149 * Method valueOf.Returns a new ColourThreshTypeType based on
150 * the given String value.
153 * @return the ColourThreshTypeType value of parameter 'string'
155 public static jalview.schemabinding.version2.types.ColourThreshTypeType valueOf(
156 final java.lang.String string) {
157 java.lang.Object obj = null;
158 if (string != null) {
159 obj = _memberTable.get(string);
162 String err = "" + string + " is not a valid ColourThreshTypeType";
163 throw new IllegalArgumentException(err);
165 return (ColourThreshTypeType) obj;