T
- value typepublic class HistoricalValue<T> extends AbstractHistorical<T,AbstractHistorical.EventValue<T>> implements Historical<T>
Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
AbstractHistorical.EventValue<T>
Constructor and Description |
---|
HistoricalValue(HistoryManager historyManager)
Constructor.
|
HistoricalValue(HistoryManager historyManager,
T initialValue)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
T |
get()
Get value at current simulation time.
|
T |
get(Time time)
Get value at given time.
|
void |
set(T value)
Set value at the current simulation time.
|
String |
toString() |
addEvent, cleanUpHistory, getEvent, getEvents, getLastEvent, isLastState, now, removeEvent
public HistoricalValue(HistoryManager historyManager)
historyManager
- HistoryManager; history managerpublic HistoricalValue(HistoryManager historyManager, T initialValue)
historyManager
- HistoryManager; history managerinitialValue
- T; initial valuepublic final void set(T value)
set
in interface Historical<T>
value
- T; valuepublic final T get()
get
in interface Historical<T>
public final T get(Time time)
get
in interface Historical<T>
time
- Time; time to get the valueCopyright © 2014–2019 Delft University of Technology. All rights reserved.