Clover icon

jalviewX

  1. Project Clover database Wed Oct 31 2018 15:13:58 GMT
  2. Package jalview.schemabinding.version2.types

File ColourThreshTypeType.java

 

Coverage histogram

../../../../img/srcFileCovDistChart7.png
28% of files have more coverage

Code metrics

4
19
7
1
168
54
9
0.47
2.71
7
1.29

Classes

Class Line # Actions
ColourThreshTypeType 21 19 9 10
0.666666766.7%
 

Contributing tests

This file is covered by 1 test. .

Source view

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 ColourThreshTypeType.
18    *
19    * @version $Revision$ $Date$
20    */
 
21    public class ColourThreshTypeType implements java.io.Serializable {
22   
23   
24    //--------------------------/
25    //- Class/Member Variables -/
26    //--------------------------/
27   
28    /**
29    * The NONE type
30    */
31    public static final int NONE_TYPE = 0;
32   
33    /**
34    * The instance of the NONE type
35    */
36    public static final ColourThreshTypeType NONE = new ColourThreshTypeType(NONE_TYPE, "NONE");
37   
38    /**
39    * The ABOVE type
40    */
41    public static final int ABOVE_TYPE = 1;
42   
43    /**
44    * The instance of the ABOVE type
45    */
46    public static final ColourThreshTypeType ABOVE = new ColourThreshTypeType(ABOVE_TYPE, "ABOVE");
47   
48    /**
49    * The BELOW type
50    */
51    public static final int BELOW_TYPE = 2;
52   
53    /**
54    * The instance of the BELOW type
55    */
56    public static final ColourThreshTypeType BELOW = new ColourThreshTypeType(BELOW_TYPE, "BELOW");
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  3 toggle private ColourThreshTypeType(final int type, final java.lang.String value) {
79  3 super();
80  3 this.type = type;
81  3 this.stringValue = value;
82    }
83   
84   
85    //-----------/
86    //- Methods -/
87    //-----------/
88   
89    /**
90    * Method enumerate.Returns an enumeration of all possible
91    * instances of ColourThreshTypeType
92    *
93    * @return an Enumeration over all possible instances of
94    * ColourThreshTypeType
95    */
 
96  0 toggle public static java.util.Enumeration enumerate(
97    ) {
98  0 return _memberTable.elements();
99    }
100   
101    /**
102    * Method getType.Returns the type of this ColourThreshTypeType
103    *
104    * @return the type of this ColourThreshTypeType
105    */
 
106  0 toggle public int getType(
107    ) {
108  0 return this.type;
109    }
110   
111    /**
112    * Method init.
113    *
114    * @return the initialized Hashtable for the member table
115    */
 
116  1 toggle private static java.util.Hashtable init(
117    ) {
118  1 Hashtable members = new Hashtable();
119  1 members.put("NONE", NONE);
120  1 members.put("ABOVE", ABOVE);
121  1 members.put("BELOW", BELOW);
122  1 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  0 toggle private java.lang.Object readResolve(
133    ) {
134  0 return valueOf(this.stringValue);
135    }
136   
137    /**
138    * Method toString.Returns the String representation of this
139    * ColourThreshTypeType
140    *
141    * @return the String representation of this ColourThreshTypeTyp
142    */
 
143  12 toggle public java.lang.String toString(
144    ) {
145  12 return this.stringValue;
146    }
147   
148    /**
149    * Method valueOf.Returns a new ColourThreshTypeType based on
150    * the given String value.
151    *
152    * @param string
153    * @return the ColourThreshTypeType value of parameter 'string'
154    */
 
155  4 toggle public static jalview.schemabinding.version2.types.ColourThreshTypeType valueOf(
156    final java.lang.String string) {
157  4 java.lang.Object obj = null;
158  4 if (string != null) {
159  4 obj = _memberTable.get(string);
160    }
161  4 if (obj == null) {
162  0 String err = "" + string + " is not a valid ColourThreshTypeType";
163  0 throw new IllegalArgumentException(err);
164    }
165  4 return (ColourThreshTypeType) obj;
166    }
167   
168    }