edu.neu.ccs.filter
Class RangeFilter.Long

java.lang.Object
  |
  +--edu.neu.ccs.filter.NumericFilter
        |
        +--edu.neu.ccs.filter.RangeFilter
              |
              +--edu.neu.ccs.filter.RangeFilter.Long
All Implemented Interfaces:
Cloneable, EventListener, PropertyChangeListener, Serializable, StringableFilter
Enclosing class:
RangeFilter

public static class RangeFilter.Long
extends RangeFilter

Range filter representing integer upper and lower bounds of primitive precision.

Since:
1.0
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.Long(long min, boolean minInclusive, long max, boolean maxInclusive)
          Constructs a range bounded by the given values with the given individual exclusivity.
RangeFilter.Long(long min, long 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.
 long getMaximum()
          Returns the maximum bound for this range.
protected  MaximumBoundFilter.Long getMaximumFilter()
          Returns the maximum bound filter used by this range filter.
 long getMinimum()
          Returns the minimum bound for this range.
protected  MinimumBoundFilter.Long 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(long 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(long 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.Long

public RangeFilter.Long(long min,
                        long 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.Long

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

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

getMinimum

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

See Also:
setMinimum(long)

setMaximum

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

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

getMaximum

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

See Also:
setMaximum(long)

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


getMaximumFilter

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