public class DoubleRange extends NumericRange<java.lang.Double>
Double
.Constructor and Description |
---|
DoubleRange()
Initializes a new instance of
DoubleRange . |
DoubleRange(java.lang.Double min,
java.lang.Double max)
Initializes a new instance of
DoubleRange . |
DoubleRange(DoubleRange range)
Initializes a new instance of
DoubleRange . |
Modifier and Type | Method and Description |
---|---|
IRange<java.lang.Double> |
clone()
Creates and returns a copy of this object
|
boolean |
getIsZero()
Gets whether the range is Zero, where max equals min
|
java.lang.Class<java.lang.Double> |
getValueType()
Gets the type of range values
|
void |
growBy(double minFraction,
double maxFraction)
Grows the current
IRange by the min and max fraction |
getMaxAsDouble, getMinAsDouble
addRangeChangeObserver, clipTo, clipTo, equals, getDiff, getIsDefined, getIsMinMaxValid, getMath, getMax, getMin, hashCode, isValueWithinRange, removeRangeChangeObserver, set, setMax, setMin, setMinMax, setMinMaxDouble, setMinMaxDoubleForced, setMinMaxForced, setMinMaxWithLimit, toString, union, union
public DoubleRange()
DoubleRange
.public DoubleRange(java.lang.Double min, java.lang.Double max)
DoubleRange
.min
- The min value to initialize range with.max
- The max value to initialize range with.public DoubleRange(DoubleRange range)
DoubleRange
.range
- The DoubleRange
instance to initialize new range with.public boolean getIsZero()
public void growBy(double minFraction, double maxFraction)
IRange
by the min and max fractionminFraction
- The min fraction to grow by. For example, min = -10 and minFraction = 0.1
will result in the new min = -11maxFraction
- The max fraction to grow by. For example, max = 10 and minFraction = 0.2
will result in the new max = 12public IRange<java.lang.Double> clone() throws java.lang.CloneNotSupportedException
clone
in interface IRange<java.lang.Double>
clone
in class RangeBase<java.lang.Double>
java.lang.CloneNotSupportedException
- if the object's class does not
support the Cloneable
interface. Subclasses
that override the clone
method can also
throw this exception to indicate that an instance cannot
be cloned.public final java.lang.Class<java.lang.Double> getValueType()