public class DoubleRange extends Object implements INumberRange
DoubleRange class stores range of floats. Examples : "1.2-3", "2 .. 4", "123.456 ... 1000.00001"
(Important: using of ".." and "..." requires spaces between numbers and separator).| Constructor and Description |
|---|
DoubleRange() |
DoubleRange(double range) |
DoubleRange(double lowerBound,
double upperBound) |
DoubleRange(double lowerBound,
double upperBound,
RangeWithBounds.BoundType lowerBoundType,
RangeWithBounds.BoundType upperBoundType) |
DoubleRange(String range) |
public DoubleRange(double range)
public DoubleRange(double lowerBound,
double upperBound)
public DoubleRange(double lowerBound,
double upperBound,
RangeWithBounds.BoundType lowerBoundType,
RangeWithBounds.BoundType upperBoundType)
public DoubleRange()
public DoubleRange(String range)
public static RangeWithBounds getRangeWithBounds(String range)
protected static boolean isTruncated(Number from, double to)
from - converting numberto - converted double valuepublic int compareLowerBound(DoubleRange range)
range - the DoubleRange to be comparedpublic int compareUpperBound(DoubleRange range)
range - the DoubleRange to be comparedpublic boolean contains(double x)
public boolean contains(DoubleValue value)
public boolean contains(DoubleRange range)
public boolean containsNumber(Number n)
containsNumber in interface INumberRangepublic double getLowerBound()
public double getUpperBound()
public DoubleRange intersect(DoubleRange range)
public void setLowerBound(double lowerBound)
lowerBound - The lowerBound to set.public void setUpperBound(double upperBound)
upperBound - The upperBound to set.public RangeWithBounds.BoundType getLowerBoundType()
public void setLowerBoundType(RangeWithBounds.BoundType lowerBoundType)
public RangeWithBounds.BoundType getUpperBoundType()
public void setUpperBoundType(RangeWithBounds.BoundType upperBoundType)
public static DoubleRange autocast(byte x, DoubleRange y)
public static DoubleRange autocast(short x, DoubleRange y)
public static DoubleRange autocast(int x, DoubleRange y)
public static DoubleRange autocast(long x, DoubleRange y)
public static DoubleRange autocast(float x, DoubleRange y)
public static DoubleRange autocast(double x, DoubleRange y)
public static DoubleRange cast(BigInteger x, DoubleRange y)
public static DoubleRange cast(BigDecimal x, DoubleRange y)
public static DoubleRange cast(ByteValue x, DoubleRange y)
public static DoubleRange cast(ShortValue x, DoubleRange y)
public static DoubleRange cast(IntValue x, DoubleRange y)
public static DoubleRange cast(LongValue x, DoubleRange y)
public static DoubleRange cast(FloatValue x, DoubleRange y)
public static DoubleRange cast(DoubleValue x, DoubleRange y)
public static DoubleRange cast(BigIntegerValue x, DoubleRange y)
public static DoubleRange cast(BigDecimalValue x, DoubleRange y)
Copyright © 2004–2019 OpenL Tablets. All rights reserved.