edu.neu.ccs.filter
Class MaximumBoundFilter.BigDecimal

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

public static class MaximumBoundFilter.BigDecimal
extends MaximumBoundFilter

Maximum bound filter representing an real number upper bound of arbitrary precision.

Since:
1.0
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class edu.neu.ccs.filter.MaximumBoundFilter
MaximumBoundFilter.BigDecimal, MaximumBoundFilter.BigInteger, MaximumBoundFilter.Double, MaximumBoundFilter.Long
 
Field Summary
protected  BigDecimal maximum
          The maximum bound for the range.
 
Fields inherited from class edu.neu.ccs.filter.MaximumBoundFilter
MAXIMUM
 
Fields inherited from class edu.neu.ccs.filter.BoundFilter
inclusive, INCLUSIVE
 
Fields inherited from class edu.neu.ccs.filter.NumericFilter
changeAdapter
 
Constructor Summary
MaximumBoundFilter.BigDecimal(BigDecimal max)
          Constructs an inclusive range bounded by the given maximum value.
MaximumBoundFilter.BigDecimal(BigDecimal max, boolean isInclusive)
          Constructs an inclusive or exclusive range bounded by the given maximum value.
 
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.
 void setMaximum(BigDecimal max)
          Sets the maximum bound for the range to the given value.
 
Methods inherited from class edu.neu.ccs.filter.BoundFilter
isInclusive, setInclusive
 
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

maximum

protected BigDecimal maximum
The maximum bound for the range.

Constructor Detail

MaximumBoundFilter.BigDecimal

public MaximumBoundFilter.BigDecimal(BigDecimal max)
Constructs an inclusive range bounded by the given maximum value.

Parameters:
max - the maximum value for the range

MaximumBoundFilter.BigDecimal

public MaximumBoundFilter.BigDecimal(BigDecimal max,
                                     boolean isInclusive)
Constructs an inclusive or exclusive range bounded by the given maximum value.

Parameters:
max - the maximum value for the range
isInclusive - whether or not the range 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

setMaximum

public void setMaximum(BigDecimal max)
Sets the maximum bound for the range to the given value. If null, the bound 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(BigDecimal)