gov.usda.gdpc
Class AbstractLocusGroup

java.lang.Object
  extended bygov.usda.gdpc.AbstractGroup
      extended bygov.usda.gdpc.AbstractDBElementGroup
          extended bygov.usda.gdpc.AbstractLocusGroup
All Implemented Interfaces:
java.util.Collection, DBElementGroup, Group, java.util.List, LocusGroup
Direct Known Subclasses:
Chromosome, DefaultLocusGroup

public abstract class AbstractLocusGroup
extends AbstractDBElementGroup
implements LocusGroup

This class provides a skeletal implementation of the LocusGroup interface to minimize the effort required to implement this interface.

Author:
terryc

Field Summary
 
Fields inherited from class gov.usda.gdpc.AbstractDBElementGroup
myIndex
 
Constructor Summary
AbstractLocusGroup()
          AbstractLocusGroup constructor.
AbstractLocusGroup(java.util.List list)
          AbstractLocusGroup constructor.
AbstractLocusGroup(Locus[] loci)
          AbstractLocusGroup constructor.
AbstractLocusGroup(LocusGroup[] groups)
          AbstractLocusGroup constructor.
 
Method Summary
 Locus getLocus(java.lang.String dataSource, Identifier id)
          This returns the locus instance from this group that matches the specified id and source.
 LocusGroup getLocusGroup(LocusFilter filter)
          Get the locus group matching the given filter from this locus group.
 java.lang.String getType()
          Get type of this group.
 
Methods inherited from class gov.usda.gdpc.AbstractDBElementGroup
getDBElementGroup, getDBElements, getDistinctProperties, index, toString
 
Methods inherited from class gov.usda.gdpc.AbstractGroup
add, add, addAll, addAll, clear, contains, containsAll, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface gov.usda.gdpc.DBElementGroup
getDBElements, getDistinctProperties, index
 
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
 

Constructor Detail

AbstractLocusGroup

public AbstractLocusGroup(Locus[] loci)
AbstractLocusGroup constructor.

Parameters:
loci - list of loci to be a part of this group.

AbstractLocusGroup

public AbstractLocusGroup()
AbstractLocusGroup constructor. Creates an empty group.


AbstractLocusGroup

public AbstractLocusGroup(java.util.List list)
AbstractLocusGroup constructor.

Parameters:
list - list of objects to be a part of this group. Any null in the list will be discarded.

AbstractLocusGroup

public AbstractLocusGroup(LocusGroup[] groups)
AbstractLocusGroup constructor.

Parameters:
groups - groups to include in this new group.
Method Detail

getLocusGroup

public LocusGroup getLocusGroup(LocusFilter filter)
Get the locus group matching the given filter from this locus group.

Specified by:
getLocusGroup in interface LocusGroup
Parameters:
filter - filter
Returns:
locus group

getLocus

public Locus getLocus(java.lang.String dataSource,
                      Identifier id)
This returns the locus instance from this group that matches the specified id and source. Null will be returned if its not in this group.

Specified by:
getLocus in interface LocusGroup
Parameters:
dataSource - data source
id - identifier
Returns:
locus or null if not in this group.

getType

public java.lang.String getType()
Get type of this group.

Specified by:
getType in interface DBElementGroup
Returns:
type