public class Range
extends java.lang.Object
Range a = Range.between(0, 10);
Range b = Range.between(10, 20);
The value 10 would be included as part of range `b` but not as part of
range `a`, since ranges are always exclusive of their max value.
Consumers of this class should use the public static factory methods
(below, above, and between) to create Ranges, since those methods handle
infinities and NaN values correctly.| Modifier and Type | Method and Description |
|---|---|
static Range |
above(double min)
Creates a new Range object with the designated lower bound and Double.POSITIVE_INFINITY
as the upper bound.
|
static Range |
below(double max)
Creates a new Range object with the designated upper bound and Double.NEGATIVE_INFINITY
as the lower bound.
|
static Range |
between(double min,
double max)
Creates a new Range object with the designated lower and upper bounds.
|
double |
getMax() |
double |
getMin() |
java.lang.String |
unparse()
Creates a syntactically correct string version of this range, suitable
for building range aggregate and distance aggregate clauses.
|
public double getMin()
public double getMax()
public static Range below(double max)
max - The upper bound for the range.public static Range above(double min)
min - The lower bound for the range.public static Range between(double min, double max)
min - The lower bound for the range.max - The upper bound for the range.public java.lang.String unparse()