JAL-3130 de-multi-release-jar.sh Script to make multi-release jar file single release.
[jalview.git] / src / jalview / schemabinding / version2 / types / FeatureMatcherByType.java
1 /*
2  * This class was automatically generated with 
3  * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
4  * Schema.
5  * $Id$
6  */
7
8 package jalview.schemabinding.version2.types;
9
10   //---------------------------------/
11  //- Imported classes and packages -/
12 //---------------------------------/
13
14 import java.util.Hashtable;
15
16 /**
17  * Class FeatureMatcherByType.
18  * 
19  * @version $Revision$ $Date$
20  */
21 public class FeatureMatcherByType implements java.io.Serializable {
22
23
24       //--------------------------/
25      //- Class/Member Variables -/
26     //--------------------------/
27
28     /**
29      * The byLabel type
30      */
31     public static final int BYLABEL_TYPE = 0;
32
33     /**
34      * The instance of the byLabel type
35      */
36     public static final FeatureMatcherByType BYLABEL = new FeatureMatcherByType(BYLABEL_TYPE, "byLabel");
37
38     /**
39      * The byScore type
40      */
41     public static final int BYSCORE_TYPE = 1;
42
43     /**
44      * The instance of the byScore type
45      */
46     public static final FeatureMatcherByType BYSCORE = new FeatureMatcherByType(BYSCORE_TYPE, "byScore");
47
48     /**
49      * The byAttribute type
50      */
51     public static final int BYATTRIBUTE_TYPE = 2;
52
53     /**
54      * The instance of the byAttribute type
55      */
56     public static final FeatureMatcherByType BYATTRIBUTE = new FeatureMatcherByType(BYATTRIBUTE_TYPE, "byAttribute");
57
58     /**
59      * Field _memberTable.
60      */
61     private static java.util.Hashtable _memberTable = init();
62
63     /**
64      * Field type.
65      */
66     private int type = -1;
67
68     /**
69      * Field stringValue.
70      */
71     private java.lang.String stringValue = null;
72
73
74       //----------------/
75      //- Constructors -/
76     //----------------/
77
78     private FeatureMatcherByType(final int type, final java.lang.String value) {
79         super();
80         this.type = type;
81         this.stringValue = value;
82     }
83
84
85       //-----------/
86      //- Methods -/
87     //-----------/
88
89     /**
90      * Method enumerate.Returns an enumeration of all possible
91      * instances of FeatureMatcherByType
92      * 
93      * @return an Enumeration over all possible instances of
94      * FeatureMatcherByType
95      */
96     public static java.util.Enumeration enumerate(
97     ) {
98         return _memberTable.elements();
99     }
100
101     /**
102      * Method getType.Returns the type of this FeatureMatcherByType
103      * 
104      * @return the type of this FeatureMatcherByType
105      */
106     public int getType(
107     ) {
108         return this.type;
109     }
110
111     /**
112      * Method init.
113      * 
114      * @return the initialized Hashtable for the member table
115      */
116     private static java.util.Hashtable init(
117     ) {
118         Hashtable members = new Hashtable();
119         members.put("byLabel", BYLABEL);
120         members.put("byScore", BYSCORE);
121         members.put("byAttribute", BYATTRIBUTE);
122         return members;
123     }
124
125     /**
126      * Method readResolve. will be called during deserialization to
127      * replace the deserialized object with the correct constant
128      * instance.
129      * 
130      * @return this deserialized object
131      */
132     private java.lang.Object readResolve(
133     ) {
134         return valueOf(this.stringValue);
135     }
136
137     /**
138      * Method toString.Returns the String representation of this
139      * FeatureMatcherByType
140      * 
141      * @return the String representation of this FeatureMatcherByTyp
142      */
143     public java.lang.String toString(
144     ) {
145         return this.stringValue;
146     }
147
148     /**
149      * Method valueOf.Returns a new FeatureMatcherByType based on
150      * the given String value.
151      * 
152      * @param string
153      * @return the FeatureMatcherByType value of parameter 'string'
154      */
155     public static jalview.schemabinding.version2.types.FeatureMatcherByType valueOf(
156             final java.lang.String string) {
157         java.lang.Object obj = null;
158         if (string != null) {
159             obj = _memberTable.get(string);
160         }
161         if (obj == null) {
162             String err = "" + string + " is not a valid FeatureMatcherByType";
163             throw new IllegalArgumentException(err);
164         }
165         return (FeatureMatcherByType) obj;
166     }
167
168 }