Class AbstractHistoricalCollection.AddEvent<E,C extends Collection<E>>
- java.lang.Object
-
- org.opentrafficsim.core.perception.AbstractHistorical.EventValue<E>
-
- org.opentrafficsim.core.perception.collections.AbstractHistoricalCollection.EventCollection<E,C>
-
- org.opentrafficsim.core.perception.collections.AbstractHistoricalCollection.AddEvent<E,C>
-
- Type Parameters:
E
- element typeC
- collection type
- All Implemented Interfaces:
AbstractHistorical.Event
- Enclosing class:
- AbstractHistoricalCollection<E,C extends Collection<E>>
public static class AbstractHistoricalCollection.AddEvent<E,C extends Collection<E>> extends AbstractHistoricalCollection.EventCollection<E,C>
Event for adding value to the collection.Copyright (c) 2013-2022 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.- Version:
- $Revision$, $LastChangedDate$, by $Author$, initial version 1 jan. 2018
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
restore(C collection)
Restores the collection to the state of before the event.String
toString()
-
Methods inherited from class org.opentrafficsim.core.perception.AbstractHistorical.EventValue
getTime, getValue
-
-
-
-
Constructor Detail
-
AddEvent
public AddEvent(double time, E value)
Constructor.- Parameters:
time
- double; time of eventvalue
- E; value of event
-
-
Method Detail
-
restore
public void restore(C collection)
Restores the collection to the state of before the event.- Specified by:
restore
in classAbstractHistoricalCollection.EventCollection<E,C extends Collection<E>>
- Parameters:
collection
- C; collection to restore
-
toString
public String toString()
- Overrides:
toString
in classAbstractHistoricalCollection.EventCollection<E,C extends Collection<E>>
-
-