gov.usda.gdpc
Class AlleleList

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractList
          extended bygov.usda.gdpc.AlleleList
All Implemented Interfaces:
java.util.Collection, java.util.List

public final class AlleleList
extends java.util.AbstractList
implements java.util.List

List of alleles.

Author:
terryc

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
AlleleList(java.util.Collection c)
          AlleleList constructor.
AlleleList(java.lang.String[] values)
          AlleleList constructor.
 
Method Summary
 java.lang.Object get(int index)
          Returns the element at the specified position in this list.
 int size()
          Returns the number of elements in this collection.
 java.lang.String toString()
          Returns the string representation of this allele list.
 
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
 
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, subList, toArray, toArray
 

Constructor Detail

AlleleList

public AlleleList(java.util.Collection c)
AlleleList constructor. Creates an allele list consisting of the elements specified by the collection, in the order they are returned by the collection's iterator. All elements in the collection must be of type String.

Parameters:
c - collection

AlleleList

public AlleleList(java.lang.String[] values)
AlleleList constructor. Creates an allele list consisting of the elements specified by the array, in the same order as the array.

Parameters:
values - values
Method Detail

get

public java.lang.Object get(int index)
Returns the element at the specified position in this list.

Specified by:
get in interface java.util.List
Parameters:
index - index of element to return.
Returns:
the element at the specified position in this list.
Throws:
java.lang.IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size()).

size

public int size()
Returns the number of elements in this collection. If this collection contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.

Specified by:
size in interface java.util.List
Returns:
the number of elements in this collection

toString

public java.lang.String toString()
Returns the string representation of this allele list.

Returns:
string representation