edu.neu.ccs.filter
Class RangeFilter.BigDecimal

java.lang.Object
  extended byedu.neu.ccs.filter.NumericFilter
      extended byedu.neu.ccs.filter.RangeFilter
          extended byedu.neu.ccs.filter.RangeFilter.BigDecimal
All Implemented Interfaces:
Cloneable, EventListener, PropertyChangeListener, Serializable, StringableFilter
Enclosing class:
RangeFilter

public static class RangeFilter.BigDecimal
extends RangeFilter

Range filter representing real number upper and lower bounds of arbitrary precision.

Since:
1.0
Version:
2.1
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class edu.neu.ccs.filter.RangeFilter
RangeFilter.BigDecimal, RangeFilter.BigInteger, RangeFilter.Double, RangeFilter.Long
 
Field Summary
protected  MaximumBoundFilter.BigDecimal maximum
          The maximum range bound.
protected  MinimumBoundFilter.BigDecimal minimum
          The minimum range bound.
 
Fields inherited from class edu.neu.ccs.filter.RangeFilter
MAXIMUM, MAXIMUM_INCLUSIVE, MINIMUM, MINIMUM_INCLUSIVE
 
Fields inherited from class edu.neu.ccs.filter.NumericFilter
changeAdapter
 
Constructor Summary
RangeFilter.BigDecimal(BigDecimal min, BigDecimal max)
          Constructs an inclusive range bounded by the given values.
RangeFilter.BigDecimal(BigDecimal min, boolean minInclusive, BigDecimal max, boolean maxInclusive)
          Constructs a range bounded by the given values with the given individual exclusivity.
 
Method Summary
 Stringable filterStringable(Stringable obj)
          Returns the given object if it satisfies the bound for this range.
 BigDecimal getMaximum()
          Returns the maximum bound for this range.
protected  MaximumBoundFilter.BigDecimal getMaximumFilter()
          Returns the maximum bound filter used by this range filter.
 BigDecimal getMinimum()
          Returns the minimum bound for this range.
protected  MinimumBoundFilter.BigDecimal getMinimumFilter()
          Returns the minimum bound filter used by this range filter.
 boolean isMaximumInclusive()
          Returns whether or not the maximum bound is inclusive.
 boolean isMinimumInclusive()
          Returns whether or not the minimum bound is inclusive.
 void setMaximum(BigDecimal max)
          Sets the maximum bound for the range to the given value.
 void setMaximumInclusive(boolean inclusive)
          Sets whether or not the maximum bound is inclusive to the given value.
 void setMinimum(BigDecimal min)
          Sets the minimum bound for the range to the given value.
 void setMinimumInclusive(boolean inclusive)
          Sets whether or not the minimum bound is inclusive to the given value.
 
Methods inherited from class edu.neu.ccs.filter.RangeFilter
propertyChange
 
Methods inherited from class edu.neu.ccs.filter.NumericFilter
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

minimum

protected MinimumBoundFilter.BigDecimal minimum
The minimum range bound.


maximum

protected MaximumBoundFilter.BigDecimal maximum
The maximum range bound.

Constructor Detail

RangeFilter.BigDecimal

public RangeFilter.BigDecimal(BigDecimal min,
                              BigDecimal max)
Constructs an inclusive range bounded by the given values.

Parameters:
min - the minimum value for the range
max - the maximum value for the range

RangeFilter.BigDecimal

public RangeFilter.BigDecimal(BigDecimal min,
                              boolean minInclusive,
                              BigDecimal max,
                              boolean maxInclusive)
Constructs a range bounded by the given values with the given individual exclusivity.

Parameters:
min - the minimum value for the range
minInclusive - whether or not the minimum value is inclusive
max - the maximum value for the range
maxInclusive - whether or not the maximum value is inclusive
Method Detail

filterStringable

public Stringable filterStringable(Stringable obj)
                            throws FilterException
Returns the given object if it satisfies the bound for this range.

Specified by:
filterStringable in interface StringableFilter
Overrides:
filterStringable in class NumericFilter
Parameters:
obj - the object to be filtered
Throws:
FilterException - if the object is out of bounds

setMinimum

public void setMinimum(BigDecimal min)
Sets the minimum bound for the range to the given value. If null, the value is not changed.

Parameters:
min - the desired minimum bound
See Also:
getMinimum()

getMinimum

public BigDecimal getMinimum()
Returns the minimum bound for this range.

See Also:
setMinimum(java.math.BigDecimal)

setMaximum

public void setMaximum(BigDecimal max)
Sets the maximum bound for the range to the given value. If null, the value is not changed.

Parameters:
max - the desired maximum bound
See Also:
getMaximum()

getMaximum

public BigDecimal getMaximum()
Returns the maximum bound for this range.

See Also:
setMaximum(java.math.BigDecimal)

setMinimumInclusive

public void setMinimumInclusive(boolean inclusive)
Sets whether or not the minimum bound is inclusive to the given value.

Parameters:
inclusive - whether or not the bound is inclusive
See Also:
isMinimumInclusive()

isMinimumInclusive

public boolean isMinimumInclusive()
Returns whether or not the minimum bound is inclusive.

See Also:
setMinimumInclusive(boolean)

setMaximumInclusive

public void setMaximumInclusive(boolean inclusive)
Sets whether or not the maximum bound is inclusive to the given value.

Parameters:
inclusive - whether or not the bound is inclusive
See Also:
isMaximumInclusive()

isMaximumInclusive

public boolean isMaximumInclusive()
Returns whether or not the maximum bound is inclusive.

See Also:
setMaximumInclusive(boolean)

getMinimumFilter

protected MinimumBoundFilter.BigDecimal getMinimumFilter()
Returns the minimum bound filter used by this range filter.


getMaximumFilter

protected MaximumBoundFilter.BigDecimal getMaximumFilter()
Returns the maximum bound filter used by this range filter.