com.timeindexing.time
Class ElapsedMillisecondTimestamp

java.lang.Object
  extended bycom.timeindexing.time.ElapsedMillisecondTimestamp
All Implemented Interfaces:
MillisecondScale, Relative, RelativeTimestamp, Scale, java.io.Serializable, Timestamp, Value

public class ElapsedMillisecondTimestamp
extends java.lang.Object
implements RelativeTimestamp, MillisecondScale, java.io.Serializable

A timestamp that only has significant data down to millisecond level. The Java runtime currently goes down to milliseconds, so these are easy to get in Java. A value of zero is 0.000, not Jan 1st 1970.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.timeindexing.time.Timestamp
ELAPSED_MICROSECOND, ELAPSED_MICROSECOND_SIGN, ELAPSED_MILLISECOND, ELAPSED_MILLISECOND_SIGN, ELAPSED_NANOSECOND, ELAPSED_NANOSECOND_SIGN, ELAPSED_SECOND, ELAPSED_SECOND_SIGN, ELAPSED_UNITS, ELAPSED_UNITS_SIGN, EXTENDED, EXTENDED_2, EXTENDED_3, EXTENDED_4, MICROSECOND, MICROSECOND_SIGN, MILLISECOND, MILLISECOND_SIGN, NANOSECOND, NANOSECOND_SIGN, SECOND, SECOND_SIGN, SPARE_3E, SPARE_3E_SIGN, SPARE_FD, SPARE_FD_SIGN, SPARE_FE, SPARE_FE_SIGN, TOP_2_MASK, TOP_4_MASK, TOP_6_MASK, TOP_8_MASK, ZERO
 
Fields inherited from interface com.timeindexing.time.MillisecondScale
SCALE
 
Constructor Summary
ElapsedMillisecondTimestamp()
          Construct a ElapsedTimestamp with nowasthe timestamp.
ElapsedMillisecondTimestamp(long valueTS)
          Construct a ElapsedTimestamp from a number of milliseconds.
ElapsedMillisecondTimestamp(long seconds, int nanoseconds)
          Construct a ElapsedMillisecondTimestamp from a number of seconds and a number of nanoseconds.
ElapsedMillisecondTimestamp(Millisecond timeSpecifier)
          Construct a ElapsedTimestamp from a Millisecond TimeSpecifier.
 
Method Summary
 int getNanoSeconds()
          Get the number of nanoseconds for this timestamp
 Scale getScale()
          Get the Scale.
 long getSeconds()
          Get the number of seconds
 boolean isNegative()
          Does the Timestamp specify a negative time.
 java.lang.String toString()
          Get the toString() version of a ElapsedTimestamp.
 long value()
          Get the raw value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ElapsedMillisecondTimestamp

public ElapsedMillisecondTimestamp()
Construct a ElapsedTimestamp with nowasthe timestamp.


ElapsedMillisecondTimestamp

public ElapsedMillisecondTimestamp(long valueTS)
Construct a ElapsedTimestamp from a number of milliseconds.


ElapsedMillisecondTimestamp

public ElapsedMillisecondTimestamp(Millisecond timeSpecifier)
Construct a ElapsedTimestamp from a Millisecond TimeSpecifier.


ElapsedMillisecondTimestamp

public ElapsedMillisecondTimestamp(long seconds,
                                   int nanoseconds)
Construct a ElapsedMillisecondTimestamp from a number of seconds and a number of nanoseconds.

Method Detail

getSeconds

public long getSeconds()
Get the number of seconds

Specified by:
getSeconds in interface Timestamp

getNanoSeconds

public int getNanoSeconds()
Get the number of nanoseconds for this timestamp

Specified by:
getNanoSeconds in interface Timestamp

isNegative

public boolean isNegative()
Does the Timestamp specify a negative time.

Specified by:
isNegative in interface RelativeTimestamp

getScale

public Scale getScale()
Get the Scale.

Specified by:
getScale in interface Timestamp

toString

public java.lang.String toString()
Get the toString() version of a ElapsedTimestamp.


value

public long value()
Get the raw value. Used in other parts of the implementation.

Specified by:
value in interface Value