com.timeindexing.time
Class TimestampMapping

java.lang.Object
  extended bycom.timeindexing.time.TimestampMapping
All Implemented Interfaces:
Absolute, java.lang.Cloneable, Position, Value

public class TimestampMapping
extends java.lang.Object
implements Position, Absolute

A TimestampMapping is an object that holds the mapping of a Timestamp to a Position in an index. The Timestamp to Position is looked up at runtime. These objects are used to cache the found Position.


Field Summary
 
Fields inherited from interface com.timeindexing.basic.Position
END_OF_INDEX, TOO_HIGH, TOO_LOW
 
Constructor Summary
TimestampMapping(Timestamp t, Position p)
          Construct a TimestampMapping
 
Method Summary
 java.lang.Object clone()
          Clone me.
 Position position()
          Get the position
 Timestamp timestamp()
          Get the Timestamp
 java.lang.String toString()
          The toString method shows the Position.
 long value()
          Get the value
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TimestampMapping

public TimestampMapping(Timestamp t,
                        Position p)
Construct a TimestampMapping

Method Detail

value

public long value()
Get the value

Specified by:
value in interface Value

position

public Position position()
Get the position

Specified by:
position in interface Position

timestamp

public Timestamp timestamp()
Get the Timestamp


clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Clone me. Needed in order to be a Position.

Specified by:
clone in interface Position
Throws:
java.lang.CloneNotSupportedException

toString

public java.lang.String toString()
The toString method shows the Position.