public class BigDecimalRange extends AbstractRange<java.math.BigDecimal>
| Modifier and Type | Field and Description |
|---|---|
protected java.math.BigDecimal |
_max |
protected java.math.BigDecimal |
_min |
PROPERTY_MAX, PROPERTY_MIN| Constructor and Description |
|---|
BigDecimalRange()
Creates a numeric range with minimum 0.0 and maximum of 1.0
|
BigDecimalRange(java.math.BigDecimal min,
java.math.BigDecimal max)
Create a numeric range by supplying minimum and maximum values
|
BigDecimalRange(BigDecimalRange BigDecimalRange)
Creates a copy of the supplied BigDecimalRange
|
| Modifier and Type | Method and Description |
|---|---|
void |
adjust(java.math.BigDecimal lower,
java.math.BigDecimal upper)
Adjusts the range.
|
boolean |
contains(java.math.BigDecimal x)
Determines whether the supplied point lies within this range.
|
Range<java.math.BigDecimal> |
copy() |
Range<java.math.BigDecimal> |
createIntermediate(Range<java.math.BigDecimal> target,
double position) |
boolean |
equals(java.lang.Object other)
Test for equality based on the values of min and max
|
java.math.BigDecimal |
getMax() |
java.math.BigDecimal |
getMin() |
int |
hashCode() |
java.math.BigDecimal |
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(java.math.BigDecimal max)
Sets the maximum value
|
void |
setMin(java.math.BigDecimal min)
Sets the minimum value
|
double |
size()
Compute the size of the range
|
BigDecimalRange |
stretch(double stretchFactor)
Creates a new BigDecimalRange by enlarging this numeric range about its mid-point.
|
BigDecimalRange |
stretch(double stretchFactorForLower,
double stretchFactorForUpper)
Creates a new BigDecimalRange by enlarging this numeric range about its mid-point.
|
java.lang.String |
toString() |
java.math.BigDecimal |
upper() |
addPropertyChangeListener, compareTo, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListenerpublic BigDecimalRange()
public BigDecimalRange(java.math.BigDecimal min,
java.math.BigDecimal max)
min - the minimummax - the maximumpublic BigDecimalRange(BigDecimalRange BigDecimalRange)
BigDecimalRange - the BigDecimalRange instance to copypublic Range<java.math.BigDecimal> copy()
copy in class AbstractRange<java.math.BigDecimal>public double minimum()
Rangepublic double maximum()
Rangepublic java.math.BigDecimal getMin()
public void setMin(java.math.BigDecimal min)
min - the new minimum value.public java.math.BigDecimal getMax()
public void setMax(java.math.BigDecimal max)
max - the new maximum value.public double size()
Rangepublic java.math.BigDecimal lower()
public void adjust(java.math.BigDecimal lower,
java.math.BigDecimal upper)
Rangelower - the new smallest value of the rangeupper - the new largest value of the rangepublic java.math.BigDecimal upper()
public boolean contains(java.math.BigDecimal x)
Rangecontains() method is more like a set membership test.public BigDecimalRange stretch(double stretchFactor)
stretchFactor - the multiplication factor for the enlargementpublic BigDecimalRange 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 rangepublic Range<java.math.BigDecimal> createIntermediate(Range<java.math.BigDecimal> target, double position)
createIntermediate in class AbstractRange<java.math.BigDecimal>public boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object