gov.usda.gdpc
Class FilterRangeValue

java.lang.Object
  extended bygov.usda.gdpc.AbstractFilterValue
      extended bygov.usda.gdpc.FilterRangeValue
All Implemented Interfaces:
FilterValue

public final class FilterRangeValue
extends AbstractFilterValue

This is a filter value which consists of a range of values. The range is represented by a minimum value and maximum value and includes the end values.

Author:
terryc

Field Summary
 
Fields inherited from class gov.usda.gdpc.AbstractFilterValue
myProperty
 
Constructor Summary
FilterRangeValue(Property property, java.lang.Comparable minValue, java.lang.Comparable maxValue)
          FilterRangeValue Constructor.
 
Method Summary
 java.lang.Comparable getMaxValue()
          Gets the maximum value of this range.
 java.lang.Comparable getMinValue()
          Gets the minimum value of this range.
 FilterValueType getType()
          Returns type of this filter value.
 boolean matches(java.util.Map properties)
          Returns whether the given properties match this filter value.
 java.lang.String toString()
          Returns the String representation of this filter value.
 
Methods inherited from class gov.usda.gdpc.AbstractFilterValue
getProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FilterRangeValue

public FilterRangeValue(Property property,
                        java.lang.Comparable minValue,
                        java.lang.Comparable maxValue)
FilterRangeValue Constructor. If the minimum value is null, the range will match anything less than or equal to the maximum value. If the maximum value is null, the range will match anything greater than or equal to the minimum value. It is not allowed for both values to be null.

Parameters:
property - property associated with this value
minValue - minimum value
maxValue - maximum value
Method Detail

getType

public FilterValueType getType()
Returns type of this filter value.

Returns:
filter value type

getMinValue

public java.lang.Comparable getMinValue()
Gets the minimum value of this range.

Returns:
minimum value

getMaxValue

public java.lang.Comparable getMaxValue()
Gets the maximum value of this range.

Returns:
maximum value

matches

public boolean matches(java.util.Map properties)
Returns whether the given properties match this filter value.

Parameters:
properties - properties to check
Returns:
true if all properties matches

toString

public java.lang.String toString()
Returns the String representation of this filter value.

Returns:
String representation