public class VarcharConstantRange extends ConstantRange
Constructor and Description |
---|
VarcharConstantRange(String low,
boolean lowIncl,
String 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()
Returns whether it is possible to have normal values (e.g., those other
than positive and negative infinities, etc.) lying within this range.
|
boolean |
largerThan(Constant c) |
double |
length() |
boolean |
lessThan(Constant c) |
Constant |
low()
Returns the lower bound.
|
ConstantRange |
union(ConstantRange r) |
newInstance, newInstance, toString
public VarcharConstantRange(String low, boolean lowIncl, String 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()
ConstantRange
isValid
in class ConstantRange
public boolean hasLowerBound()
hasLowerBound
in class ConstantRange
public boolean hasUpperBound()
hasUpperBound
in class ConstantRange
public Constant low()
ConstantRange
automatic type
conversion
, the returned constant may have a type different from that of
the constant passed at construction time.low
in class ConstantRange
public Constant high()
ConstantRange
automatic type
conversion
, the returned constant may have a type different from that of
the constant passed at construction time.high
in class ConstantRange
public boolean isLowInclusive()
isLowInclusive
in class ConstantRange
public boolean isHighInclusive()
isHighInclusive
in class ConstantRange
public double length()
length
in class ConstantRange
public ConstantRange applyLow(Constant c, boolean incl)
ConstantRange
applyLow
in class ConstantRange
c
- the specified constantincl
- whether the constant is inclusivepublic ConstantRange applyHigh(Constant c, boolean incl)
ConstantRange
applyHigh
in class ConstantRange
c
- the specified constantincl
- whether the constant is inclusivepublic ConstantRange applyConstant(Constant c)
applyConstant
in class ConstantRange
public boolean isConstant()
isConstant
in class ConstantRange
public Constant asConstant()
asConstant
in class ConstantRange
public boolean contains(Constant c)
contains
in class ConstantRange
public boolean lessThan(Constant c)
lessThan
in class ConstantRange
public boolean largerThan(Constant c)
largerThan
in class ConstantRange
public boolean isOverlapping(ConstantRange r)
isOverlapping
in class ConstantRange
public boolean contains(ConstantRange r)
contains
in class ConstantRange
public ConstantRange intersect(ConstantRange r)
intersect
in class ConstantRange
public ConstantRange union(ConstantRange r)
union
in class ConstantRange
Copyright © 2022 VanillaDB Organization. All rights reserved.