public class BigDecimalRange extends AbstractRange<BigDecimal>
| Modifier and Type | Field and Description |
|---|---|
protected BigDecimal |
_max |
protected BigDecimal |
_min |
PROPERTY_MAX, PROPERTY_MIN| Constructor and Description |
|---|
BigDecimalRange()
Creates a numeric range with minimum 0.0 and maximum of 1.0
|
BigDecimalRange(BigDecimal min,
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(BigDecimal lower,
BigDecimal upper)
Adjusts the range.
|
boolean |
contains(BigDecimal x)
Determines whether the supplied point lies within this range.
|
Range<BigDecimal> |
copy() |
Range<BigDecimal> |
createIntermediate(Range<BigDecimal> target,
double position) |
boolean |
equals(Object other)
Test for equality based on the values of min and max
|
BigDecimal |
getMax() |
BigDecimal |
getMin() |
int |
hashCode() |
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(BigDecimal max)
Sets the maximum value
|
void |
setMin(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.
|
String |
toString() |
BigDecimal |
upper() |
addPropertyChangeListener, compareTo, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListenerprotected BigDecimal _min
protected BigDecimal _max
public BigDecimalRange()
public BigDecimalRange(BigDecimal min, BigDecimal max)
min - the minimummax - the maximumpublic BigDecimalRange(BigDecimalRange BigDecimalRange)
BigDecimalRange - the BigDecimalRange instance to copypublic Range<BigDecimal> copy()
copy in class AbstractRange<BigDecimal>public double minimum()
Rangepublic double maximum()
Rangepublic BigDecimal getMin()
public void setMin(BigDecimal min)
min - the new minimum value.public BigDecimal getMax()
public void setMax(BigDecimal max)
max - the new maximum value.public double size()
Rangepublic BigDecimal lower()
public void adjust(BigDecimal lower, BigDecimal upper)
Rangelower - the new smallest value of the rangeupper - the new largest value of the rangepublic BigDecimal upper()
public boolean contains(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<BigDecimal> createIntermediate(Range<BigDecimal> target, double position)
createIntermediate in class AbstractRange<BigDecimal>public boolean equals(Object other)
Copyright © 2017. All rights reserved.