public class CombinedNumericRange extends AbstractNumericRange<java.lang.Double>
PROPERTY_MAX, PROPERTY_MIN| Constructor and Description |
|---|
CombinedNumericRange()
Using this constructor relies on the user subsequently calling add() to add a range
|
| Modifier and Type | Method and Description |
|---|---|
CombinedNumericRange |
add(Range<java.lang.Double> range)
Add a new range to this combined range.
|
void |
adjust(java.lang.Double lower,
java.lang.Double upper)
Calls to this method throw an UnsupportedOprationException.
|
boolean |
contains(java.lang.Double x)
This range contains some point iff one or more of its sub-ranges contain that point
|
Range<java.lang.Double> |
createIntermediate(Range<java.lang.Double> targetRange,
double position) |
NumericRange |
getRange(double leadingMarginProportion,
double trailingMarginProportion)
Returns a new numeric range that is based on this range, but with a margin introduced at each end.
|
java.lang.Double |
lower()
The lower value in the range; here, the same as
minimum |
double |
maximum()
Lazily calculates the maximum value in the range
|
double |
minimum()
Lazily calculates the minimum value in the range
|
int |
rangeCount()
Returns the number of sub-ranges contained by this range
|
double |
size()
The size of the range is computed as the maximum minus the minimum value.
|
java.lang.String |
toString() |
java.lang.Double |
upper()
The upper value in the range; here, the same as
maximum() |
addPropertyChangeListener, compareTo, copy, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListenerpublic CombinedNumericRange()
public CombinedNumericRange add(Range<java.lang.Double> range)
range - the new range to addpublic java.lang.Double lower()
minimumpublic java.lang.Double upper()
maximum()public int rangeCount()
public void adjust(java.lang.Double lower,
java.lang.Double upper)
lower - the new smallest value of the rangeupper - the new largest value of the rangejava.lang.UnsupportedOperationExceptionpublic double maximum()
public double minimum()
public boolean contains(java.lang.Double x)
public double size()
public NumericRange getRange(double leadingMarginProportion, double trailingMarginProportion)
leadingMarginProportion - how much margin to add at the low end of the rangetrailingMarginProportion - how much margin to add at the top end of the rangepublic Range<java.lang.Double> createIntermediate(Range<java.lang.Double> targetRange, double position)
createIntermediate in class AbstractRange<java.lang.Double>public java.lang.String toString()
toString in class java.lang.Object