edu.neu.ccs.filter
Class RangeFilter.Double

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

public static class RangeFilter.Double
extends RangeFilter

Range filter representing real number upper and lower bounds of primitive 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
 
Fields inherited from class edu.neu.ccs.filter.RangeFilter
maximum, MAXIMUM, MAXIMUM_INCLUSIVE, minimum, MINIMUM, MINIMUM_INCLUSIVE
 
Fields inherited from class edu.neu.ccs.filter.NumericFilter
changeAdapter
 
Constructor Summary
RangeFilter.Double(double min, boolean minInclusive, double max, boolean maxInclusive)
          Constructs a range bounded by the given values with the given individual exclusivity.
RangeFilter.Double(double min, double max)
          Constructs an inclusive range bounded by the given values.
 
Method Summary
 Stringable filterStringable(Stringable obj)
          Returns the given object if it satisfies the bound for this range.
 double getMaximum()
          Returns the maximum bound for this range.
protected  MaximumBoundFilter.Double getMaximumFilter()
          Returns the maximum bound filter used by this range filter.
 double getMinimum()
          Returns the minimum bound for this range.
protected  MinimumBoundFilter.Double 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(double 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(double 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
 

Constructor Detail

RangeFilter.Double

public RangeFilter.Double(double min,
                          double 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.Double

public RangeFilter.Double(double min,
                          boolean minInclusive,
                          double 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(double min)
Sets the minimum bound for the range to the given value.

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

getMinimum

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

See Also:
setMinimum(double)

setMaximum

public void setMaximum(double max)
Sets the maximum bound for the range to the given value.

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

getMaximum

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

See Also:
setMaximum(double)

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.Double getMinimumFilter()
Returns the minimum bound filter used by this range filter.


getMaximumFilter

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