Package org.opentrafficsim.base
Class TimeStampedObject<C>
- java.lang.Object
-
- org.opentrafficsim.base.TimeStampedObject<C>
-
- Type Parameters:
C
- the time stamped object class.
- All Implemented Interfaces:
java.io.Serializable
public class TimeStampedObject<C> extends java.lang.Object implements java.io.Serializable
An object with a time stamp, where the object is of a specific class.Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
$LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $, initial version Jan 29, 2016
BSD-style license. See OpenTrafficSim License.- Author:
- Alexander Verbraeck, Peter Knoppers
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TimeStampedObject(C object, Time timestamp)
Construct a new TimeStampedObject.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
C
getObject()
Retrieve the object.Time
getTimestamp()
Retrieve the time stamp.int
hashCode()
java.lang.String
toString()
-
-
-
Method Detail
-
getObject
public final C getObject()
Retrieve the object.- Returns:
- C; the object
-
getTimestamp
public final Time getTimestamp()
Retrieve the time stamp.- Returns:
- Time; the time stamp
-
toString
public final java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-