|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.range.AbstractRange<T> com.jidesoft.range.AbstractNumericRange<Double> com.jidesoft.range.CombinedNumericRange
public class CombinedNumericRange
A little convenience class to compute the maximum and minimum values of multiple ranges.
Field Summary |
---|
Fields inherited from interface com.jidesoft.range.Range |
---|
PROPERTY_MAX, PROPERTY_MIN |
Constructor Summary | |
---|---|
CombinedNumericRange()
Using this constructor relies on the user subsequently calling add() to add a range |
Method Summary | |
---|---|
CombinedNumericRange |
add(Range<Double> range)
Add a new range to this combined range. |
void |
adjust(Double lower,
Double upper)
Calls to this method throw an UnsupportedOprationException. |
boolean |
contains(Double x)
This range contains some point iff one or more of its sub-ranges contain that point |
Range<Double> |
createIntermediate(Range<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. |
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. |
String |
toString()
|
Double |
upper()
The upper value in the range; here, the same as maximum() |
Methods inherited from class com.jidesoft.range.AbstractRange |
---|
addPropertyChangeListener, copy, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, removePropertyChangeListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CombinedNumericRange()
Method Detail |
---|
public CombinedNumericRange add(Range<Double> range)
range
- the new range to add
public Double lower()
minimum
public Double upper()
maximum()
public int rangeCount()
public void adjust(Double lower, Double upper)
lower
- the new smallest value of the rangeupper
- the new largest value of the range
UnsupportedOperationException
public double maximum()
public double minimum()
public boolean contains(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 range
public Range<Double> createIntermediate(Range<Double> targetRange, double position)
createIntermediate
in class AbstractRange<Double>
public String toString()
toString
in class Object
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |