public class DoubleConstantRange extends ConstantRange
| Constructor and Description |
|---|
DoubleConstantRange(Double low,
boolean lowIncl,
Double high,
boolean highIncl)
Constructs a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
ConstantRange |
applyConstant(Constant c) |
ConstantRange |
applyHigh(Constant c,
boolean incl)
Returns a new range with high set to the specified constant if doing so
makes the upper bound more strict.
|
ConstantRange |
applyLow(Constant c,
boolean incl)
Returns a new range with low set to the specified constant if doing so
makes the lower bound more strict.
|
Constant |
asConstant() |
boolean |
contains(Constant c) |
boolean |
contains(ConstantRange r) |
boolean |
hasLowerBound() |
boolean |
hasUpperBound() |
Constant |
high()
Returns the higher bound.
|
ConstantRange |
intersect(ConstantRange r) |
boolean |
isConstant() |
boolean |
isHighInclusive() |
boolean |
isLowInclusive() |
boolean |
isOverlapping(ConstantRange r) |
boolean |
isValid()
|
boolean |
largerThan(Constant c) |
double |
length() |
boolean |
lessThan(Constant c) |
Constant |
low()
Returns the lower bound.
|
ConstantRange |
union(ConstantRange r) |
newInstance, newInstance, toStringpublic DoubleConstantRange(Double low, boolean lowIncl, Double high, boolean highIncl)
low - the lower bound. null means unbound.lowIncl - whether the lower bound is inclusivehigh - the higher bound. null means unbound.highIncl - whether the higher bound is inclusivepublic boolean isValid()
NEG_INF, INF, and NAN) lying within this
range.isValid in class ConstantRangepublic boolean hasLowerBound()
hasLowerBound in class ConstantRangepublic boolean hasUpperBound()
hasUpperBound in class ConstantRangepublic Constant low()
ConstantRangeautomatic type
conversion, the returned constant may have a type different from that of
the constant passed at construction time.low in class ConstantRangepublic Constant high()
ConstantRangeautomatic type
conversion, the returned constant may have a type different from that of
the constant passed at construction time.high in class ConstantRangepublic boolean isLowInclusive()
isLowInclusive in class ConstantRangepublic boolean isHighInclusive()
isHighInclusive in class ConstantRangepublic double length()
length in class ConstantRangepublic ConstantRange applyLow(Constant c, boolean incl)
ConstantRangeapplyLow in class ConstantRangec - the specified constantincl - whether the constant is inclusivepublic ConstantRange applyHigh(Constant c, boolean incl)
ConstantRangeapplyHigh in class ConstantRangec - the specified constantincl - whether the constant is inclusivepublic ConstantRange applyConstant(Constant c)
applyConstant in class ConstantRangepublic boolean isConstant()
isConstant in class ConstantRangepublic Constant asConstant()
asConstant in class ConstantRangepublic boolean contains(Constant c)
contains in class ConstantRangepublic boolean lessThan(Constant c)
lessThan in class ConstantRangepublic boolean largerThan(Constant c)
largerThan in class ConstantRangepublic boolean isOverlapping(ConstantRange r)
isOverlapping in class ConstantRangepublic boolean contains(ConstantRange r)
contains in class ConstantRangepublic ConstantRange intersect(ConstantRange r)
intersect in class ConstantRangepublic ConstantRange union(ConstantRange r)
union in class ConstantRangeCopyright © 2022 VanillaDB Organization. All rights reserved.