it.list.jft
Interface TimeStamp

All Superinterfaces:
Serializable

public interface TimeStamp
extends Serializable

Interface that allows to represent a temporal indicator.

Each timestamp is represented by a couple of int:

This interface extend the Serializable interface in order to save and then re-create TimeStamp objects.

In alternative a programmer may save the two ints returned by getDateTime() and getProg() and then re-create the same TimeStamp object using the JFT.makeTimeStamp() with the 2 saved ints as parameters.


Method Summary
 int compareTo(TimeStamp timeStamp)
          Compare two TimeStamps.
 int getDateTime()
          Returns the number of seconds since January 1, 1970, 00:00:00 GMT.
 int getProg()
          Returns the associated incremental counter.
 

Method Detail

getDateTime

int getDateTime()
Returns the number of seconds since January 1, 1970, 00:00:00 GMT.

To obtain a Date object use:
new Date(getDateTime()*1000L)

Returns:
the number of seconds since January 1, 1970, 00:00:00 GMT.

getProg

int getProg()
Returns the associated incremental counter.

The incremental counter is used to make the time stamp univocal when it was generated within the same time unit.

Returns:
the associated incremental counter.

compareTo

int compareTo(TimeStamp timeStamp)
Compare two TimeStamps.

Parameters:
timeStamp - the TimeStamp to be compared.
Returns:
a negative integer, zero, or a positive integer as this TimeStamp is less than, equal to, or greater than the specified TimeStamp.


Submit a bug or feature to FT\API Programming Support<\font>