|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jclass.TimedObject
Is a very simple class that includes a timestamp in it.
Should be subclassed to do something really usefull.
Written: Radu Sion
Version: 0.11
Source: TimedObject.java
Visit
Smart Software
Field Summary | |
long |
Created
A object creation timestamp in ms that should be taken from a timebase that characterizes this object. |
Constructor Summary | |
TimedObject()
Constructor that initializes the internal creation timestamp to the absolute UTC time via System.currentTimeMillis(). |
|
TimedObject(long timestamp)
Constructor that uses the provided parameter to initialize the creation time. |
Method Summary | |
long |
computeAge(long now)
Computes the age of this object referring to a given moment in time. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public long Created
Constructor Detail |
public TimedObject()
public TimedObject(long timestamp)
timestamp
- Value used to init the internal creation timestampMethod Detail |
public long computeAge(long now)
public java.lang.String toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |