Package com.jidesoft.range
Class BooleanRange
- java.lang.Object
-
- com.jidesoft.range.AbstractRange<java.lang.Boolean>
-
- com.jidesoft.range.BooleanRange
-
public class BooleanRange extends AbstractRange<java.lang.Boolean>
-
-
Field Summary
-
Fields inherited from interface com.jidesoft.range.Range
PROPERTY_MAX, PROPERTY_MIN
-
-
Constructor Summary
Constructors Constructor Description BooleanRange(boolean lower, boolean upper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadjust(java.lang.Boolean lower, java.lang.Boolean upper)Adjusts the range.booleancontains(java.lang.Boolean x)Determines whether the supplied point lies within this range.Range<java.lang.Boolean>createIntermediate(Range<java.lang.Boolean> targetRange, double position)booleanequals(java.lang.Object o)inthashCode()java.lang.Booleanlower()doublemaximum()This may be the numeric representation of upper() or it may be rounded up.doubleminimum()This may be the numeric representation of lower() or it may be rounded down.protected voidsetMax(boolean upper)protected voidsetMin(boolean lower)doublesize()Compute the size of the rangejava.lang.StringtoString()java.lang.Booleanupper()-
Methods inherited from class com.jidesoft.range.AbstractRange
addPropertyChangeListener, compareTo, copy, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener
-
-
-
-
Method Detail
-
createIntermediate
public Range<java.lang.Boolean> createIntermediate(Range<java.lang.Boolean> targetRange, double position)
- Specified by:
createIntermediatein classAbstractRange<java.lang.Boolean>
-
lower
public java.lang.Boolean lower()
- Returns:
- the smallest value of the range
-
upper
public java.lang.Boolean upper()
- Returns:
- the largest value of the range
-
adjust
public void adjust(java.lang.Boolean lower, java.lang.Boolean upper)Description copied from interface:RangeAdjusts the range.- Parameters:
lower- the new smallest value of the rangeupper- the new largest value of the range
-
setMin
protected void setMin(boolean lower)
-
setMax
protected void setMax(boolean upper)
-
minimum
public double minimum()
Description copied from interface:RangeThis may be the numeric representation of lower() or it may be rounded down.- Returns:
- the numeric value of the smallest value to include in the range.
-
maximum
public double maximum()
Description copied from interface:RangeThis may be the numeric representation of upper() or it may be rounded up.- Returns:
- The numeric value of the largest value to include in the range.
-
size
public double size()
Description copied from interface:RangeCompute the size of the range
-
contains
public boolean contains(java.lang.Boolean x)
Description copied from interface:RangeDetermines whether the supplied point lies within this range. For continuous ranges this is interpreted as a pair of inequalities on the supplied value (i.e., min <= x <= max), but for discrete ranges thecontains()method is more like a set membership test.- Returns:
- a boolean to indicate whether the supplied point lies within the range
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-