com.timeindexing.basic
Class EndPointInterval

java.lang.Object
  extended bycom.timeindexing.basic.AbsoluteInterval
      extended bycom.timeindexing.basic.EndPointInterval
All Implemented Interfaces:
java.lang.Cloneable, Interval

public class EndPointInterval
extends AbsoluteInterval
implements Interval, java.lang.Cloneable

An end-point interval is an interval where both of the the arguments are end-points of the interval, and can be resolved into two positions into an Index. Neither of the specifiers can be adjusted. Intervals can be:

TODO: finish implementations.


Field Summary
static int ABSOLUTETIMESTAMP_PLUS_COUNT
          A Timestamp plus Count specifier.
static int ABSOLUTETIMESTAMP_TO_ABSOLUTETIMESTAMP
          A Timestamp to Timestamp specifier.
static int ABSOLUTETIMESTAMP_TO_POSITION
          A Timestamp to Position specifier.
static int ABSOLUTETIMESTAMP_TO_RELATIVETIMESTAMP
          A Timestamp to Timestamp specifier.
static int POSITION_PLUS_COUNT
          A Position plus Count specifier.
static int POSITION_TO_ABSOLUTETIMESTAMP
          A Position to Timestamp specifier.
static int POSITION_TO_POSITION
          A Position to Position specifier.
static int POSITION_TO_RELATIVETIMESTAMP
          A Position to Timestamp specifier.
 
Constructor Summary
EndPointInterval(AbsoluteTimestamp t0, AbsoluteTimestamp t1)
          Construct an EndPointInterval from a Timestamp and a Timestamp.
EndPointInterval(AbsoluteTimestamp t0, Count c)
          Construct an EndPointInterval from a Timestamp and a Count.
EndPointInterval(AbsoluteTimestamp t0, Position pos)
          Construct an EndPointInterval from a Timestamp and a Position.
EndPointInterval(AbsoluteTimestamp t0, RelativeTimestamp relT)
          Construct an EndPointInterval from a AbsoluteTimestamp and a RelativeTimestamp
EndPointInterval(Position posStart, AbsoluteTimestamp t)
          Construct an EndPointInterval from a Position and a Timestamp.
EndPointInterval(Position pos, Count c)
          Construct an EndPointInterval from a Position and a Count.
EndPointInterval(Position posStart, Position posEnd)
          Construct an EndPointInterval from a Position and a Position.
EndPointInterval(Position pos, RelativeTimestamp relT)
          Construct an EndPointInterval from a Position and a RelativeTimestamp.
 
Method Summary
protected  void checkNulls(Value v1, Value v2)
          This used to check for nulls in the constructor.
 java.lang.Object clone()
          Clone me
 AbsoluteInterval resolve(Index index, IndexTimestampSelector selector, Lifetime lifetime)
          Resolve this interval w.r.t a specified index.
 java.lang.String toString()
          String version of interval.
 
Methods inherited from class com.timeindexing.basic.AbsoluteInterval
end, isResolved, start
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.timeindexing.basic.Interval
end, start
 

Field Detail

ABSOLUTETIMESTAMP_TO_ABSOLUTETIMESTAMP

public static final int ABSOLUTETIMESTAMP_TO_ABSOLUTETIMESTAMP
A Timestamp to Timestamp specifier.

See Also:
Constant Field Values

ABSOLUTETIMESTAMP_TO_POSITION

public static final int ABSOLUTETIMESTAMP_TO_POSITION
A Timestamp to Position specifier.

See Also:
Constant Field Values

ABSOLUTETIMESTAMP_PLUS_COUNT

public static final int ABSOLUTETIMESTAMP_PLUS_COUNT
A Timestamp plus Count specifier.

See Also:
Constant Field Values

ABSOLUTETIMESTAMP_TO_RELATIVETIMESTAMP

public static final int ABSOLUTETIMESTAMP_TO_RELATIVETIMESTAMP
A Timestamp to Timestamp specifier.

See Also:
Constant Field Values

POSITION_TO_ABSOLUTETIMESTAMP

public static final int POSITION_TO_ABSOLUTETIMESTAMP
A Position to Timestamp specifier.

See Also:
Constant Field Values

POSITION_TO_POSITION

public static final int POSITION_TO_POSITION
A Position to Position specifier.

See Also:
Constant Field Values

POSITION_PLUS_COUNT

public static final int POSITION_PLUS_COUNT
A Position plus Count specifier.

See Also:
Constant Field Values

POSITION_TO_RELATIVETIMESTAMP

public static final int POSITION_TO_RELATIVETIMESTAMP
A Position to Timestamp specifier.

See Also:
Constant Field Values
Constructor Detail

EndPointInterval

public EndPointInterval(AbsoluteTimestamp t0,
                        AbsoluteTimestamp t1)
Construct an EndPointInterval from a Timestamp and a Timestamp. Because it is possible for there to be more than one timeindex item for a particular Timestamp, having both the start Timestamp and the end Timestamp be equal, is NOT illegal.


EndPointInterval

public EndPointInterval(AbsoluteTimestamp t0,
                        Position pos)
Construct an EndPointInterval from a Timestamp and a Position.


EndPointInterval

public EndPointInterval(AbsoluteTimestamp t0,
                        Count c)
Construct an EndPointInterval from a Timestamp and a Count.


EndPointInterval

public EndPointInterval(AbsoluteTimestamp t0,
                        RelativeTimestamp relT)
Construct an EndPointInterval from a AbsoluteTimestamp and a RelativeTimestamp


EndPointInterval

public EndPointInterval(Position posStart,
                        AbsoluteTimestamp t)
Construct an EndPointInterval from a Position and a Timestamp.


EndPointInterval

public EndPointInterval(Position posStart,
                        Position posEnd)
Construct an EndPointInterval from a Position and a Position. The order doesn't matter.


EndPointInterval

public EndPointInterval(Position pos,
                        Count c)
Construct an EndPointInterval from a Position and a Count.


EndPointInterval

public EndPointInterval(Position pos,
                        RelativeTimestamp relT)
Construct an EndPointInterval from a Position and a RelativeTimestamp.

Method Detail

checkNulls

protected void checkNulls(Value v1,
                          Value v2)
This used to check for nulls in the constructor. If no exception is thrown things are good.


resolve

public AbsoluteInterval resolve(Index index,
                                IndexTimestampSelector selector,
                                Lifetime lifetime)
Resolve this interval w.r.t a specified index. The IndexTimestampSelector determines whether to use Index timestamps or Data timestamps. The Lifetime determines whether timestamps are continuous or discrete. This only affects start points. Returns a clone with resolved positions on success, returns null on failire to resolve.

Specified by:
resolve in class AbsoluteInterval

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Clone me

Throws:
java.lang.CloneNotSupportedException

toString

public java.lang.String toString()
String version of interval.