util
Class TimeStampedObject

java.lang.Object
  |
  +--util.TimeStampedObject
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
TextObject

public class TimeStampedObject
extends Object
implements Serializable

This class is a base class for all objects that need to know how old they are

See Also:
Serialized Form

Field Summary
protected  long birthTime
           
 
Constructor Summary
TimeStampedObject()
           
 
Method Summary
 long getAge()
          Returns the age of this object (since declared bith time)
 long getCreationTime()
          returns the time when this object was created
 void resetCreationTime()
          Sets birth time to now
 void resetCreationTime(long t)
          Sets birth time to specified time
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

birthTime

protected long birthTime
Constructor Detail

TimeStampedObject

public TimeStampedObject()
Method Detail

getCreationTime

public long getCreationTime()
returns the time when this object was created

resetCreationTime

public void resetCreationTime()
Sets birth time to now

resetCreationTime

public void resetCreationTime(long t)
Sets birth time to specified time

getAge

public long getAge()
Returns the age of this object (since declared bith time)