public class BehavioralCharacteristics extends Object implements Serializable
Copyright (c) 2013-2016 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
| Constructor and Description |
|---|
BehavioralCharacteristics() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(AbstractParameterType<?> parameterType)
Whether the given parameter type has been set.
|
<T extends org.djunits.value.vdouble.scalar.DoubleScalarInterface> |
getParameter(ParameterType<T> parameterType)
Get parameter of given type.
|
boolean |
getParameter(ParameterTypeBoolean parameterType)
Get parameter of given type.
|
double |
getParameter(ParameterTypeDouble parameterType)
Get parameter of given type.
|
int |
getParameter(ParameterTypeInteger parameterType)
Get parameter of given type.
|
Map<AbstractParameterType<?>,org.djunits.value.vdouble.scalar.DoubleScalarInterface> |
getParameters()
Returns a safe copy of the parameters.
|
void |
resetParameter(AbstractParameterType<?> parameterType)
Resets the parameter value to the value from before the last set.
|
void |
setAll(BehavioralCharacteristics behavioralCharacteristics)
Sets all behavioral characteristics from the given set in this set.
|
<T extends org.djunits.value.vdouble.scalar.DoubleScalarInterface> |
setDefaultParameter(AbstractParameterType<T> parameter)
Sets the default value of a parameter.
|
BehavioralCharacteristics |
setDefaultParameters(Class<?> clazz)
Sets the default values of all accessible parameters defined in the given class.
|
<T extends org.djunits.value.vdouble.scalar.DoubleScalarInterface> |
setParameter(ParameterType<T> parameterType,
T value)
Set parameter value of given parameter type.
|
void |
setParameter(ParameterTypeBoolean parameterType,
boolean value)
Set parameter value of given parameter type.
|
void |
setParameter(ParameterTypeDouble parameterType,
double value)
Set parameter value of given parameter type.
|
void |
setParameter(ParameterTypeInteger parameterType,
int value)
Set parameter value of given parameter type.
|
String |
toString() |
public final <T extends org.djunits.value.vdouble.scalar.DoubleScalarInterface> void setParameter(ParameterType<T> parameterType, T value) throws ParameterException
T - Class of value.parameterType - Parameter type.value - Value.ParameterException - If the value does not comply with value type constraints.public final void setParameter(ParameterTypeBoolean parameterType, boolean value)
parameterType - Parameter type.value - Value.public final void setParameter(ParameterTypeDouble parameterType, double value) throws ParameterException
parameterType - Parameter type.value - Value.ParameterException - If the value does not comply with value type constraints.public final void setParameter(ParameterTypeInteger parameterType, int value) throws ParameterException
parameterType - Parameter type.value - Value.ParameterException - If the value does not comply with value type constraints.public final void resetParameter(AbstractParameterType<?> parameterType) throws ParameterException
parameterType - Parameter type.ParameterException - If the parameter was never set.public <T extends org.djunits.value.vdouble.scalar.DoubleScalarInterface> T getParameter(ParameterType<T> parameterType) throws ParameterException
T - Class of value.parameterType - Parameter type.ParameterException - If parameter was never set.public final boolean getParameter(ParameterTypeBoolean parameterType) throws ParameterException
parameterType - Parameter type.ParameterException - If parameter was never set.public final int getParameter(ParameterTypeInteger parameterType) throws ParameterException
parameterType - Parameter type.ParameterException - If parameter was never set.public final double getParameter(ParameterTypeDouble parameterType) throws ParameterException
parameterType - Parameter type.ParameterException - If parameter was never set.public final boolean contains(AbstractParameterType<?> parameterType)
parameterType - Parameter type.public final Map<AbstractParameterType<?>,org.djunits.value.vdouble.scalar.DoubleScalarInterface> getParameters()
public final <T extends org.djunits.value.vdouble.scalar.DoubleScalarInterface> BehavioralCharacteristics setDefaultParameter(AbstractParameterType<T> parameter) throws ParameterException
T - Class of the value.parameter - parameter to set the default value ofParameterException - if the parameter type has no default valuepublic final BehavioralCharacteristics setDefaultParameters(Class<?> clazz)
clazz - class with parameterspublic final void setAll(BehavioralCharacteristics behavioralCharacteristics)
behavioralCharacteristics - set of behavioral characteristics to include in this setCopyright © 2014–2016 Delft University of Technology. All rights reserved.