Class HistoricalParameters
java.lang.Object
org.opentrafficsim.core.perception.AbstractHistorical<HistoricalParameters.ParameterValueSet,HistoricalParameters.ParameterEvent>
org.opentrafficsim.core.perception.HistoricalParameters
- All Implemented Interfaces:
Parameters,HistoryManager.HistoricalElement
public class HistoricalParameters extends AbstractHistorical<HistoricalParameters.ParameterValueSet,HistoricalParameters.ParameterEvent> implements Parameters
Historical representation of
Parameters.
Copyright (c) 2013-2020 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 19 jan. 2018
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classHistoricalParameters.ParameterEventParameter event, which will restore the previous value.static classHistoricalParameters.ParameterValueSetValue for a parameter event, which contains a parameter type and (the previous) value.Nested classes/interfaces inherited from class org.opentrafficsim.core.perception.AbstractHistorical
AbstractHistorical.EventValue<T> -
Constructor Summary
Constructors Constructor Description HistoricalParameters(HistoryManager manager, Parameters parameters)Constructor. -
Method Summary
Modifier and Type Method Description booleancontains(ParameterType<?> parameterType)<T> TgetParameter(ParameterType<T> parameterType)<T> TgetParameterOrNull(ParameterType<T> parameterType)ParametersgetParameters()Get the parameters at the current simulation time.ParametersgetParameters(Time time)Get the parameters at the given simulation time.voidresetParameter(ParameterType<?> parameterType)voidsetAllIn(Parameters parameters)<T> voidsetParameter(ParameterType<T> parameterType, T value)<T> voidsetParameterResettable(ParameterType<T> parameterType, T value)StringtoString()Methods inherited from class org.opentrafficsim.core.perception.AbstractHistorical
addEvent, cleanUpHistory, getEvent, getEvents, getLastEvent, isLastState, now, removeEvent
-
Constructor Details
-
HistoricalParameters
Constructor.- Parameters:
manager- HistoryManager; history managerparameters- Parameters; initial parameter set
-
-
Method Details
-
getParameters
Get the parameters at the current simulation time.- Returns:
- Parameters; parameters at the current simulation time
-
getParameters
Get the parameters at the given simulation time.- Parameters:
time- Time; simulation time- Returns:
- Parameters; parameters at the given simulation time
-
setParameter
- Specified by:
setParameterin interfaceParameters- Throws:
ParameterException
-
setParameterResettable
public <T> void setParameterResettable(ParameterType<T> parameterType, T value) throws ParameterException- Specified by:
setParameterResettablein interfaceParameters- Throws:
ParameterException
-
resetParameter
- Specified by:
resetParameterin interfaceParameters- Throws:
ParameterException
-
getParameter
- Specified by:
getParameterin interfaceParameters- Throws:
ParameterException
-
getParameterOrNull
- Specified by:
getParameterOrNullin interfaceParameters
-
contains
- Specified by:
containsin interfaceParameters
-
setAllIn
- Specified by:
setAllInin interfaceParameters
-
toString
-