Package com.jidesoft.range
Class StringRange
- All Implemented Interfaces:
Range<String>
,Comparable<Range>
-
Field Summary
Fields inherited from interface com.jidesoft.range.Range
PROPERTY_MAX, PROPERTY_MIN
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adjusts the range.int
boolean
Determines whether the supplied point lies within this range.createIntermediate
(Range<String> targetRange, double position) boolean
int
hashCode()
lower()
double
maximum()
This may be the numeric representation of upper() or it may be rounded up.double
minimum()
This may be the numeric representation of lower() or it may be rounded down.protected void
protected void
double
size()
Compute the size of the rangetoString()
upper()
Methods inherited from class com.jidesoft.range.AbstractRange
addPropertyChangeListener, copy, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener
-
Constructor Details
-
StringRange
-
-
Method Details
-
createIntermediate
- Specified by:
createIntermediate
in classAbstractRange<String>
-
lower
- Returns:
- the smallest value of the range
-
upper
- Returns:
- the largest value of the range
-
adjust
Description copied from interface:Range
Adjusts the range.- Parameters:
lower
- the new smallest value of the rangeupper
- the new largest value of the range
-
setMin
-
setMax
-
minimum
public double minimum()Description copied from interface:Range
This 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:Range
This 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:Range
Compute the size of the range -
contains
Description copied from interface:Range
Determines 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
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareTo
in interfaceComparable<Range>
- Overrides:
compareTo
in classAbstractRange<String>
-