Clover icon

jalviewX

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

File AlcodonFrame.java

 

Coverage histogram

../../../img/srcFileCovDistChart0.png
56% of files have more coverage

Code metrics

12
52
28
1
466
201
39
0.75
1.86
28
1.39

Classes

Class Line # Actions
AlcodonFrame 22 52 39 92
0.00%
 

Contributing tests

No tests hitting this source file were found.

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;
9   
10    //---------------------------------/
11    //- Imported classes and packages -/
12    //---------------------------------/
13   
14    import org.exolab.castor.xml.Marshaller;
15    import org.exolab.castor.xml.Unmarshaller;
16   
17    /**
18    * Class AlcodonFrame.
19    *
20    * @version $Revision$ $Date$
21    */
 
22    public class AlcodonFrame implements java.io.Serializable
23    {
24   
25    // --------------------------/
26    // - Class/Member Variables -/
27    // --------------------------/
28   
29    /**
30    * Field _alcodonList.
31    */
32    private java.util.Vector _alcodonList;
33   
34    /**
35    * Field _alcodMapList.
36    */
37    private java.util.Vector _alcodMapList;
38   
39    // ----------------/
40    // - Constructors -/
41    // ----------------/
42   
 
43  0 toggle public AlcodonFrame()
44    {
45  0 super();
46  0 this._alcodonList = new java.util.Vector();
47  0 this._alcodMapList = new java.util.Vector();
48    }
49   
50    // -----------/
51    // - Methods -/
52    // -----------/
53   
54    /**
55    *
56    *
57    * @param vAlcodMap
58    * @throws java.lang.IndexOutOfBoundsException
59    * if the index given is outside the bounds of the collection
60    */
 
61  0 toggle public void addAlcodMap(
62    final jalview.schemabinding.version2.AlcodMap vAlcodMap)
63    throws java.lang.IndexOutOfBoundsException
64    {
65  0 this._alcodMapList.addElement(vAlcodMap);
66    }
67   
68    /**
69    *
70    *
71    * @param index
72    * @param vAlcodMap
73    * @throws java.lang.IndexOutOfBoundsException
74    * if the index given is outside the bounds of the collection
75    */
 
76  0 toggle public void addAlcodMap(final int index,
77    final jalview.schemabinding.version2.AlcodMap vAlcodMap)
78    throws java.lang.IndexOutOfBoundsException
79    {
80  0 this._alcodMapList.add(index, vAlcodMap);
81    }
82   
83    /**
84    *
85    *
86    * @param vAlcodon
87    * @throws java.lang.IndexOutOfBoundsException
88    * if the index given is outside the bounds of the collection
89    */
 
90  0 toggle public void addAlcodon(
91    final jalview.schemabinding.version2.Alcodon vAlcodon)
92    throws java.lang.IndexOutOfBoundsException
93    {
94  0 this._alcodonList.addElement(vAlcodon);
95    }
96   
97    /**
98    *
99    *
100    * @param index
101    * @param vAlcodon
102    * @throws java.lang.IndexOutOfBoundsException
103    * if the index given is outside the bounds of the collection
104    */
 
105  0 toggle public void addAlcodon(final int index,
106    final jalview.schemabinding.version2.Alcodon vAlcodon)
107    throws java.lang.IndexOutOfBoundsException
108    {
109  0 this._alcodonList.add(index, vAlcodon);
110    }
111   
112    /**
113    * Method enumerateAlcodMap.
114    *
115    * @return an Enumeration over all jalview.schemabinding.version2.AlcodMap
116    * elements
117    */
 
118  0 toggle public java.util.Enumeration enumerateAlcodMap()
119    {
120  0 return this._alcodMapList.elements();
121    }
122   
123    /**
124    * Method enumerateAlcodon.
125    *
126    * @return an Enumeration over all jalview.schemabinding.version2.Alcodon
127    * elements
128    */
 
129  0 toggle public java.util.Enumeration enumerateAlcodon()
130    {
131  0 return this._alcodonList.elements();
132    }
133   
134    /**
135    * Method getAlcodMap.
136    *
137    * @param index
138    * @throws java.lang.IndexOutOfBoundsException
139    * if the index given is outside the bounds of the collection
140    * @return the value of the jalview.schemabinding.version2.AlcodMap at the
141    * given index
142    */
 
143  0 toggle public jalview.schemabinding.version2.AlcodMap getAlcodMap(final int index)
144    throws java.lang.IndexOutOfBoundsException
145    {
146    // check bounds for index
147  0 if (index < 0 || index >= this._alcodMapList.size())
148    {
149  0 throw new IndexOutOfBoundsException("getAlcodMap: Index value '"
150    + index + "' not in range [0.."
151    + (this._alcodMapList.size() - 1) + "]");
152    }
153   
154  0 return (jalview.schemabinding.version2.AlcodMap) _alcodMapList
155    .get(index);
156    }
157   
158    /**
159    * Method getAlcodMap.Returns the contents of the collection in an Array.
160    * <p>
161    * Note: Just in case the collection contents are changing in another thread,
162    * we pass a 0-length Array of the correct type into the API call. This way we
163    * <i>know</i> that the Array returned is of exactly the correct length.
164    *
165    * @return this collection as an Array
166    */
 
167  0 toggle public jalview.schemabinding.version2.AlcodMap[] getAlcodMap()
168    {
169  0 jalview.schemabinding.version2.AlcodMap[] array = new jalview.schemabinding.version2.AlcodMap[0];
170  0 return (jalview.schemabinding.version2.AlcodMap[]) this._alcodMapList
171    .toArray(array);
172    }
173   
174    /**
175    * Method getAlcodMapCount.
176    *
177    * @return the size of this collection
178    */
 
179  0 toggle public int getAlcodMapCount()
180    {
181  0 return this._alcodMapList.size();
182    }
183   
184    /**
185    * Method getAlcodon.
186    *
187    * @param index
188    * @throws java.lang.IndexOutOfBoundsException
189    * if the index given is outside the bounds of the collection
190    * @return the value of the jalview.schemabinding.version2.Alcodon at the
191    * given index
192    */
 
193  0 toggle public jalview.schemabinding.version2.Alcodon getAlcodon(final int index)
194    throws java.lang.IndexOutOfBoundsException
195    {
196    // check bounds for index
197  0 if (index < 0 || index >= this._alcodonList.size())
198    {
199  0 throw new IndexOutOfBoundsException("getAlcodon: Index value '"
200    + index + "' not in range [0.."
201    + (this._alcodonList.size() - 1) + "]");
202    }
203   
204  0 return (jalview.schemabinding.version2.Alcodon) _alcodonList.get(index);
205    }
206   
207    /**
208    * Method getAlcodon.Returns the contents of the collection in an Array.
209    * <p>
210    * Note: Just in case the collection contents are changing in another thread,
211    * we pass a 0-length Array of the correct type into the API call. This way we
212    * <i>know</i> that the Array returned is of exactly the correct length.
213    *
214    * @return this collection as an Array
215    */
 
216  0 toggle public jalview.schemabinding.version2.Alcodon[] getAlcodon()
217    {
218  0 jalview.schemabinding.version2.Alcodon[] array = new jalview.schemabinding.version2.Alcodon[0];
219  0 return (jalview.schemabinding.version2.Alcodon[]) this._alcodonList
220    .toArray(array);
221    }
222   
223    /**
224    * Method getAlcodonCount.
225    *
226    * @return the size of this collection
227    */
 
228  0 toggle public int getAlcodonCount()
229    {
230  0 return this._alcodonList.size();
231    }
232   
233    /**
234    * Method isValid.
235    *
236    * @return true if this object is valid according to the schema
237    */
 
238  0 toggle public boolean isValid()
239    {
240  0 try
241    {
242  0 validate();
243    } catch (org.exolab.castor.xml.ValidationException vex)
244    {
245  0 return false;
246    }
247  0 return true;
248    }
249   
250    /**
251    *
252    *
253    * @param out
254    * @throws org.exolab.castor.xml.MarshalException
255    * if object is null or if any SAXException is thrown during
256    * marshaling
257    * @throws org.exolab.castor.xml.ValidationException
258    * if this object is an invalid instance according to the schema
259    */
 
260  0 toggle public void marshal(final java.io.Writer out)
261    throws org.exolab.castor.xml.MarshalException,
262    org.exolab.castor.xml.ValidationException
263    {
264  0 Marshaller.marshal(this, out);
265    }
266   
267    /**
268    *
269    *
270    * @param handler
271    * @throws java.io.IOException
272    * if an IOException occurs during marshaling
273    * @throws org.exolab.castor.xml.ValidationException
274    * if this object is an invalid instance according to the schema
275    * @throws org.exolab.castor.xml.MarshalException
276    * if object is null or if any SAXException is thrown during
277    * marshaling
278    */
 
279  0 toggle public void marshal(final org.xml.sax.ContentHandler handler)
280    throws java.io.IOException,
281    org.exolab.castor.xml.MarshalException,
282    org.exolab.castor.xml.ValidationException
283    {
284  0 Marshaller.marshal(this, handler);
285    }
286   
287    /**
288    * Method removeAlcodMap.
289    *
290    * @param vAlcodMap
291    * @return true if the object was removed from the collection.
292    */
 
293  0 toggle public boolean removeAlcodMap(
294    final jalview.schemabinding.version2.AlcodMap vAlcodMap)
295    {
296  0 boolean removed = _alcodMapList.remove(vAlcodMap);
297  0 return removed;
298    }
299   
300    /**
301    * Method removeAlcodMapAt.
302    *
303    * @param index
304    * @return the element removed from the collection
305    */
 
306  0 toggle public jalview.schemabinding.version2.AlcodMap removeAlcodMapAt(
307    final int index)
308    {
309  0 java.lang.Object obj = this._alcodMapList.remove(index);
310  0 return (jalview.schemabinding.version2.AlcodMap) obj;
311    }
312   
313    /**
314    * Method removeAlcodon.
315    *
316    * @param vAlcodon
317    * @return true if the object was removed from the collection.
318    */
 
319  0 toggle public boolean removeAlcodon(
320    final jalview.schemabinding.version2.Alcodon vAlcodon)
321    {
322  0 boolean removed = _alcodonList.remove(vAlcodon);
323  0 return removed;
324    }
325   
326    /**
327    * Method removeAlcodonAt.
328    *
329    * @param index
330    * @return the element removed from the collection
331    */
 
332  0 toggle public jalview.schemabinding.version2.Alcodon removeAlcodonAt(
333    final int index)
334    {
335  0 java.lang.Object obj = this._alcodonList.remove(index);
336  0 return (jalview.schemabinding.version2.Alcodon) obj;
337    }
338   
339    /**
340    */
 
341  0 toggle public void removeAllAlcodMap()
342    {
343  0 this._alcodMapList.clear();
344    }
345   
346    /**
347    */
 
348  0 toggle public void removeAllAlcodon()
349    {
350  0 this._alcodonList.clear();
351    }
352   
353    /**
354    *
355    *
356    * @param index
357    * @param vAlcodMap
358    * @throws java.lang.IndexOutOfBoundsException
359    * if the index given is outside the bounds of the collection
360    */
 
361  0 toggle public void setAlcodMap(final int index,
362    final jalview.schemabinding.version2.AlcodMap vAlcodMap)
363    throws java.lang.IndexOutOfBoundsException
364    {
365    // check bounds for index
366  0 if (index < 0 || index >= this._alcodMapList.size())
367    {
368  0 throw new IndexOutOfBoundsException("setAlcodMap: Index value '"
369    + index + "' not in range [0.."
370    + (this._alcodMapList.size() - 1) + "]");
371    }
372   
373  0 this._alcodMapList.set(index, vAlcodMap);
374    }
375   
376    /**
377    *
378    *
379    * @param vAlcodMapArray
380    */
 
381  0 toggle public void setAlcodMap(
382    final jalview.schemabinding.version2.AlcodMap[] vAlcodMapArray)
383    {
384    // -- copy array
385  0 _alcodMapList.clear();
386   
387  0 for (int i = 0; i < vAlcodMapArray.length; i++)
388    {
389  0 this._alcodMapList.add(vAlcodMapArray[i]);
390    }
391    }
392   
393    /**
394    *
395    *
396    * @param index
397    * @param vAlcodon
398    * @throws java.lang.IndexOutOfBoundsException
399    * if the index given is outside the bounds of the collection
400    */
 
401  0 toggle public void setAlcodon(final int index,
402    final jalview.schemabinding.version2.Alcodon vAlcodon)
403    throws java.lang.IndexOutOfBoundsException
404    {
405    // check bounds for index
406  0 if (index < 0 || index >= this._alcodonList.size())
407    {
408  0 throw new IndexOutOfBoundsException("setAlcodon: Index value '"
409    + index + "' not in range [0.."
410    + (this._alcodonList.size() - 1) + "]");
411    }
412   
413  0 this._alcodonList.set(index, vAlcodon);
414    }
415   
416    /**
417    *
418    *
419    * @param vAlcodonArray
420    */
 
421  0 toggle public void setAlcodon(
422    final jalview.schemabinding.version2.Alcodon[] vAlcodonArray)
423    {
424    // -- copy array
425  0 _alcodonList.clear();
426   
427  0 for (int i = 0; i < vAlcodonArray.length; i++)
428    {
429  0 this._alcodonList.add(vAlcodonArray[i]);
430    }
431    }
432   
433    /**
434    * Method unmarshal.
435    *
436    * @param reader
437    * @throws org.exolab.castor.xml.MarshalException
438    * if object is null or if any SAXException is thrown during
439    * marshaling
440    * @throws org.exolab.castor.xml.ValidationException
441    * if this object is an invalid instance according to the schema
442    * @return the unmarshaled jalview.schemabinding.version2.AlcodonFrame
443    */
 
444  0 toggle public static jalview.schemabinding.version2.AlcodonFrame unmarshal(
445    final java.io.Reader reader)
446    throws org.exolab.castor.xml.MarshalException,
447    org.exolab.castor.xml.ValidationException
448    {
449  0 return (jalview.schemabinding.version2.AlcodonFrame) Unmarshaller
450    .unmarshal(jalview.schemabinding.version2.AlcodonFrame.class,
451    reader);
452    }
453   
454    /**
455    *
456    *
457    * @throws org.exolab.castor.xml.ValidationException
458    * if this object is an invalid instance according to the schema
459    */
 
460  0 toggle public void validate() throws org.exolab.castor.xml.ValidationException
461    {
462  0 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
463  0 validator.validate(this);
464    }
465   
466    }