edu.neu.ccs.filter
Class RangeFilter

java.lang.Object
  extended byedu.neu.ccs.filter.NumericFilter
      extended byedu.neu.ccs.filter.RangeFilter
All Implemented Interfaces:
Cloneable, EventListener, PropertyChangeListener, Serializable, StringableFilter
Direct Known Subclasses:
RangeFilter.BigDecimal, RangeFilter.BigInteger, RangeFilter.Double, RangeFilter.Long

public class RangeFilter
extends NumericFilter
implements PropertyChangeListener

Filter that enforces inclusive or exclusive numeric upper and lower bounds by throwing an exception when the data to be filtered violates either bound. Inner classes provide the functionality of both integer and real number bounds, of primitive or arbitrary precision.

Since:
1.0
Version:
2.2
See Also:
Serialized Form

Nested Class Summary
static class RangeFilter.BigDecimal
          Range filter representing real number upper and lower bounds of arbitrary precision.
static class RangeFilter.BigInteger
          Range filter representing integer upper and lower bounds of arbitrary precision.
static class RangeFilter.Double
          Range filter representing real number upper and lower bounds of primitive precision.
static class RangeFilter.Long
          Range filter representing integer upper and lower bounds of primitive precision.
 
Field Summary
protected  MaximumBoundFilter maximum
          Maximum bound filter used to enforce the upper bound of this range.
static String MAXIMUM
          Bound property name for the maximum property.
static String MAXIMUM_INCLUSIVE
          Bound property name for the minimum exclusivity property.
protected  MinimumBoundFilter minimum
          Minimum bound filter used to enforce the lower bound of this range.
static String MINIMUM
          Bound property name for the minimum property.
static String MINIMUM_INCLUSIVE
          Bound property name for the minimum exclusivity property.
 
Fields inherited from class edu.neu.ccs.filter.NumericFilter
changeAdapter
 
Constructor Summary
RangeFilter()
           
 
Method Summary
 void propertyChange(PropertyChangeEvent evt)
          Passes on events generated by property changes imposed on the minimum and maximum bounds.
 
Methods inherited from class edu.neu.ccs.filter.NumericFilter
addPropertyChangeListener, addPropertyChangeListener, filterStringable, removePropertyChangeListener, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MINIMUM

public static final String MINIMUM
Bound property name for the minimum property.

See Also:
Constant Field Values

MAXIMUM

public static final String MAXIMUM
Bound property name for the maximum property.

See Also:
Constant Field Values

MINIMUM_INCLUSIVE

public static final String MINIMUM_INCLUSIVE
Bound property name for the minimum exclusivity property.

See Also:
Constant Field Values

MAXIMUM_INCLUSIVE

public static final String MAXIMUM_INCLUSIVE
Bound property name for the minimum exclusivity property.

See Also:
Constant Field Values

minimum

protected MinimumBoundFilter minimum
Minimum bound filter used to enforce the lower bound of this range.


maximum

protected MaximumBoundFilter maximum
Maximum bound filter used to enforce the upper bound of this range.

Constructor Detail

RangeFilter

public RangeFilter()
Method Detail

propertyChange

public void propertyChange(PropertyChangeEvent evt)
Passes on events generated by property changes imposed on the minimum and maximum bounds.

Specified by:
propertyChange in interface PropertyChangeListener
Parameters:
evt - the property change event to handle