public class SargInterval
- extends SargIntervalBase
SargInterval represents a single contiguous search interval over a scalar
domain of a given datatype (including null values). It consists of two
endpoints: a lower bound and an upper bound, which may be the same for the
case of a single point. The endpoints are represented via instances of
SargEndpoint. An empty interval is represented by setting both bounds to be
open with the same value (the null value, but it doesn't really matter).
Instances of SargInterval are immutable after construction.
For string representation, we use the standard mathematical bracketed
bounds pair notation, with round brackets for open bounds and square brackets
for closed bounds, e.g.
- [3,5] represents all values between 3 and 5 inclusive
- (3,5] represents all values greater than 3 and less than or equal to 5
- [3,5) represents all values greatern than or equal to 3 and less than 5
- (3,5) represents all values between 3 and 5 exclusive
- (3,+infinity) represents all values greater than 3
- (-infinity,5] represents all values less than or equal to 5
- [5,5] represents the single point with coordinate 5
Null values are ordered lower than any non-null value but higher than
-infinity. So the interval [null,7) would include the null value and any
non-null value less than 7.
- $Id: //open/dev/farrago/src/org/eigenbase/sarg/SargInterval.java#7 $
- John V. Sichi
|Methods inherited from class org.eigenbase.sarg.SargIntervalBase
getDataType, getFactory, getLowerBound, getUpperBound, isEmpty, isPoint, isRange, isUnconstrained, setEmpty, setLower, setNull, setPoint, setUnconstrained, setUpper, toString, unsetLower, unsetUpper
- Creates a SargInterval.
void copyFrom(SargIntervalBase other)
boolean contains(SargInterval other)