gov.usda.gdpc
Class AbstractLocalityGroup

java.lang.Object
  extended bygov.usda.gdpc.AbstractGroup
      extended bygov.usda.gdpc.AbstractDBElementGroup
          extended bygov.usda.gdpc.AbstractLocalityGroup
All Implemented Interfaces:
java.util.Collection, DBElementGroup, Group, java.util.List, LocalityGroup
Direct Known Subclasses:
DefaultLocalityGroup

public abstract class AbstractLocalityGroup
extends AbstractDBElementGroup
implements LocalityGroup

This class provides a skeletal implementation of the LocalityGroup 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
AbstractLocalityGroup()
          AbstractLocalityGroup constructor.
AbstractLocalityGroup(java.util.List list)
          AbstractLocalityGroup constructor.
AbstractLocalityGroup(Locality[] localities)
          AbstractLocalityGroup constructor.
AbstractLocalityGroup(LocalityGroup[] groups)
          AbstractLocalityGroup constructor.
 
Method Summary
 Locality getLocality(java.lang.String dataSource, Identifier id)
          This returns the locality instance from this group that matches the specified id and source.
 LocalityGroup getLocalityGroup(LocalityFilter filter)
          Get the locality group matching the given filter from this locality group.
 java.lang.String getType()
          Get type of this group.
 
Methods inherited from class gov.usda.gdpc.AbstractDBElementGroup
getDBElementGroup, getDBElements, getDefinedProperties, 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, getDefinedProperties, 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

AbstractLocalityGroup

public AbstractLocalityGroup(Locality[] localities)
AbstractLocalityGroup constructor.

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

AbstractLocalityGroup

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


AbstractLocalityGroup

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

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

AbstractLocalityGroup

public AbstractLocalityGroup(LocalityGroup[] groups)
AbstractLocalityGroup constructor.

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

getLocalityGroup

public LocalityGroup getLocalityGroup(LocalityFilter filter)
Get the locality group matching the given filter from this locality group.

Specified by:
getLocalityGroup in interface LocalityGroup
Parameters:
filter - filter
Returns:
locality group

getLocality

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

Specified by:
getLocality in interface LocalityGroup
Parameters:
dataSource - data source
id - identifier
Returns:
locality 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