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 the arguments are a start-point plus a value from that start-point.

where the values are:


Constructor Summary
EndPointInterval(AbsolutePosition p0, Value v1)
          Construct an EndPointInterval from a Position and a Value
EndPointInterval(AbsoluteTimestamp t0, Value v1)
          Construct an EndPointInterval from a Timestamp and a Value
 
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.
protected  Position resolveValue(Index index, TimestampMapping posStart, Value value, IndexTimestampSelector selector, Lifetime lifetime)
          Resolve a Value w.r.t a Position.
 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
 

Constructor Detail

EndPointInterval

public EndPointInterval(AbsoluteTimestamp t0,
                        Value v1)
Construct an EndPointInterval from a Timestamp and a Value


EndPointInterval

public EndPointInterval(AbsolutePosition p0,
                        Value v1)
Construct an EndPointInterval from a Position and a Value

Method Detail

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 and midpoints. Returns a clone with resolved positions.

Specified by:
resolve in class AbsoluteInterval

resolveValue

protected Position resolveValue(Index index,
                                TimestampMapping posStart,
                                Value value,
                                IndexTimestampSelector selector,
                                Lifetime lifetime)
Resolve a Value w.r.t a Position.


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.


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.