|
JIDE Common Layer 3.5.3 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jidesoft.range.AbstractRange<T>
com.jidesoft.range.AbstractNumericRange<Double>
com.jidesoft.range.NumericRange
public class NumericRange
Specifies upper and lower bounds for a range of values
Field Summary | |
---|---|
protected double |
_max
|
protected double |
_min
|
Fields inherited from interface com.jidesoft.range.Range |
---|
PROPERTY_MAX, PROPERTY_MIN |
Constructor Summary | |
---|---|
NumericRange()
Creates a numeric range with minimum 0.0 and maximum of 1.0 |
|
NumericRange(double min,
double max)
Create a numeric range by supplying minimum and maximum values |
|
NumericRange(NumericRange numericRange)
Creates a copy of the supplied NumericRange |
Method Summary | |
---|---|
void |
adjust(Double lower,
Double upper)
Sets the minimum and maximum values of the range in a single call |
boolean |
contains(Double x)
Determines whether the range contains the supplied value |
Range<Double> |
copy()
|
boolean |
equals(Object other)
Test for equality based on the values of min and max |
double |
getMax()
|
double |
getMin()
|
int |
hashCode()
|
Double |
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. |
void |
setMax(double max)
Sets the maximum value |
void |
setMin(double min)
Sets the minimum value |
double |
size()
Compute the size of the range |
NumericRange |
stretch(double stretchFactor)
Creates a new NumericRange by enlarging this numeric range about its mid-point. |
NumericRange |
stretch(double stretchFactorForLower,
double stretchFactorForUpper)
Creates a new NumericRange by enlarging this numeric range about its mid-point. |
String |
toString()
|
static NumericRange |
union(NumericRange r1,
NumericRange r2)
Creates a new TimeRange as the union of two existing TimeRanges. |
Double |
upper()
|
Methods inherited from class com.jidesoft.range.AbstractRange |
---|
addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, removePropertyChangeListener |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected double _min
protected double _max
Constructor Detail |
---|
public NumericRange()
public NumericRange(double min, double max)
min
- the minumummax
- the maximumpublic NumericRange(NumericRange numericRange)
numericRange
- the NumericRange instance to copyMethod Detail |
---|
public Range<Double> copy()
copy
in class AbstractRange<Double>
public double minimum()
Range
public double maximum()
Range
public double getMin()
public void setMin(double min)
min
- the new minimum value.public double getMax()
public void setMax(double max)
max
- the new maximum value.public double size()
Range
public Double lower()
public void adjust(Double lower, Double upper)
lower
- the new smallest value of the rangeupper
- the new largest value of the rangepublic Double upper()
public boolean contains(Double x)
public NumericRange stretch(double stretchFactor)
stretchFactor
- the multiplication factor for the enlargement
public NumericRange stretch(double stretchFactorForLower, double stretchFactorForUpper)
stretchFactorForLower
- the multiplication factor for the enlargement for the lower rangestretchFactorForUpper
- the multiplication factor for the enlargement for the upper range
public boolean equals(Object other)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
public static NumericRange union(NumericRange r1, NumericRange r2)
r1
- the first TimeRanger2
- the second TimeRange
|
JIDE Common Layer 3.5.3 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |