TimeStampedObject.java

  1. package org.opentrafficsim.base;

  2. import java.io.Serializable;

  3. import org.djunits.value.vdouble.scalar.Time;

  4. /**
  5.  * An object with a time stamp, where the object is of a specific class.
  6.  * <p>
  7.  * Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
  8.  * BSD-style license. See <a href="https://opentrafficsim.org/docs/license.html">OpenTrafficSim License</a>.
  9.  * </p>
  10.  * @author <a href="https://github.com/averbraeck">Alexander Verbraeck</a>
  11.  * @author <a href="https://github.com/peter-knoppers">Peter Knoppers</a>
  12.  * @author <a href="https://github.com/wjschakel">Wouter Schakel</a>
  13.  * @param <C> the time stamped object class.
  14.  * @param object the object.
  15.  * @param timestamp the time stamp.
  16.  */
  17. public record TimeStampedObject<C>(C object, Time timestamp) implements Serializable
  18. {
  19.     /** */
  20.     private static final long serialVersionUID = 20160129L;
  21. }