public class ParameterTypeDouble extends AbstractParameterType<org.djunits.value.vdouble.scalar.Dimensionless> 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.
AbstractParameterType.CheckdefaultValue, valueClass| Constructor and Description |
|---|
ParameterTypeDouble(String id,
String description)
Constructor without default value and check.
|
ParameterTypeDouble(String id,
String description,
AbstractParameterType.Check check)
Constructor without default value, with check.
|
ParameterTypeDouble(String id,
String description,
double defaultValue)
Constructor with default value, without check.
|
ParameterTypeDouble(String id,
String description,
double defaultValue,
AbstractParameterType.Check check)
Constructor with default value and check.
|
| Modifier and Type | Method and Description |
|---|---|
void |
check(double value,
BehavioralCharacteristics bc)
Method to overwrite for checks with constraints.
|
Double |
getDefaultValue()
Returns the default value.
|
String |
printValue(BehavioralCharacteristics behavioralCharacteristics)
Print the given value from the map in BehavioralCharachteristics in a presentable format.
|
String |
toString() |
checkCheck, equals, getDescription, getId, hasDefaultValue, hashCodepublic ParameterTypeDouble(String id, String description)
id - Short name of parameter.description - Parameter description or full name.public ParameterTypeDouble(String id, String description, double defaultValue)
id - Short name of parameter.description - Parameter description or full name..defaultValue - Default value.public ParameterTypeDouble(String id, String description, AbstractParameterType.Check check)
id - Short name of parameter.description - Parameter description or full name.check - Check for parameter values.public ParameterTypeDouble(String id, String description, double defaultValue, AbstractParameterType.Check check)
id - Short name of parameter.description - Parameter description or full name.defaultValue - Default value.check - Check for parameter values.public final Double getDefaultValue() throws ParameterException
getDefaultValue in class AbstractParameterType<org.djunits.value.vdouble.scalar.Dimensionless>ParameterException - If no default value was set.public final String printValue(BehavioralCharacteristics behavioralCharacteristics) throws ParameterException
printValue in class AbstractParameterType<org.djunits.value.vdouble.scalar.Dimensionless>behavioralCharacteristics - Behavioral characteristics to get the value from.ParameterException - If the parameter is not present.public void check(double value,
BehavioralCharacteristics bc)
throws ParameterException
value - Value to check with constraints.bc - Set of behavioral characteristics.ParameterException - If the value does not comply with constraints.public String toString()
toString in class AbstractParameterType<org.djunits.value.vdouble.scalar.Dimensionless>Copyright © 2014–2016 Delft University of Technology. All rights reserved.