Class SargInterval

  extended by org.eigenbase.sarg.SargIntervalBase
      extended by org.eigenbase.sarg.SargInterval

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.

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/ $
John V. Sichi

Field Summary
Fields inherited from class org.eigenbase.sarg.SargIntervalBase
factory, lowerBound, upperBound
Constructor Summary
SargInterval(SargFactory factory, RelDataType dataType)
          Creates a SargInterval.
Method Summary
(package private)  boolean contains(SargInterval other)
(package private)  void copyFrom(SargIntervalBase other)
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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail


SargInterval(SargFactory factory,
             RelDataType dataType)
Creates a SargInterval.

Method Detail


void copyFrom(SargIntervalBase other)


boolean contains(SargInterval other)