gov.usda.gdpc
Class DistinctPropertyValues

java.lang.Object
  extended bygov.usda.gdpc.DistinctPropertyValues

public final class DistinctPropertyValues
extends java.lang.Object

Author:
terryc

Constructor Summary
DistinctPropertyValues()
          DistinctPropertyValues constructor.
DistinctPropertyValues(int initialCapacity)
          DistinctPropertyValues constructor.
 
Method Summary
 void addValues(DistinctPropertyValues values)
          This adds the given values to this instance.
 void addValues(Property property, java.util.List values)
          This adds the given values for the given property.
 Property[] getDefinedProperties()
          This returns a list of all properties with defined values.
 java.util.List getValues(Property property)
          Get distinct values for specified property.
 void resetProperty(Property property)
          This removes all values for the specificed property.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DistinctPropertyValues

public DistinctPropertyValues()
DistinctPropertyValues constructor.


DistinctPropertyValues

public DistinctPropertyValues(int initialCapacity)
DistinctPropertyValues constructor.

Parameters:
initialCapacity - initial capacity
Method Detail

addValues

public void addValues(Property property,
                      java.util.List values)
This adds the given values for the given property. This object insures that no two values are the same by disgarding duplicate values. Null values are also disgarded. If a value is not the correct data type for the given property, it is also disgarded.

Parameters:
property - property
values - values

addValues

public void addValues(DistinctPropertyValues values)
This adds the given values to this instance. This object insures that no two values are the same by disgarding duplicate values.

Parameters:
values - values

resetProperty

public void resetProperty(Property property)
This removes all values for the specificed property.

Parameters:
property - property

getDefinedProperties

public Property[] getDefinedProperties()
This returns a list of all properties with defined values.

Returns:
list of properties

getValues

public java.util.List getValues(Property property)
Get distinct values for specified property.

Parameters:
property - property
Returns:
list of distinct values. empty list if no values defined for given property.

toString

public java.lang.String toString()