public class ParameterTypeInteger 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 |
|---|
ParameterTypeInteger(String id,
String description)
Constructor without default value and check.
|
ParameterTypeInteger(String id,
String description,
AbstractParameterType.Check check)
Constructor without default value, with check.
|
ParameterTypeInteger(String id,
String description,
int defaultValue)
Constructor with default value, without check.
|
ParameterTypeInteger(String id,
String description,
int defaultValue,
AbstractParameterType.Check check)
Constructor with default value and check.
|
| Modifier and Type | Method and Description |
|---|---|
void |
check(int value,
BehavioralCharacteristics bc)
Method to overwrite for checks with constraints.
|
Integer |
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 ParameterTypeInteger(String id, String description)
id - Short name of parameter.description - Parameter description or full name.public ParameterTypeInteger(String id, String description, int defaultValue)
id - Short name of parameter.description - Parameter description or full name..defaultValue - Default value.public ParameterTypeInteger(String id, String description, AbstractParameterType.Check check)
id - Short name of parameter.description - Parameter description or full name.check - Check for parameter values.public ParameterTypeInteger(String id, String description, int 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 Integer 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(int 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.