public class ParameterTypeInteger extends ParameterTypeNumeric<Integer> implements Serializable
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.
defaultValue| Constructor and Description |
|---|
ParameterTypeInteger(String id,
String description)
Construct a new ParameterTypeInteger without default value and check.
|
ParameterTypeInteger(String id,
String description,
Constraint<? super Integer> constraint)
Construct a new ParameterTypeInteger without default value, with check.
|
ParameterTypeInteger(String id,
String description,
int defaultValue)
Construct a new ParameterTypeInteger with default value, without check.
|
ParameterTypeInteger(String id,
String description,
int defaultValue,
Constraint<? super Integer> constraint)
Construct a new ParameterTypeInteger with default value and check.
|
ParameterTypeInteger(String id,
String description,
Integer defaultValue)
Construct a new ParameterTypeInteger with default value, without check.
|
ParameterTypeInteger(String id,
String description,
Integer defaultValue,
Constraint<Number> constraint)
Construct a new ParameterTypeInteger with default value and check.
|
| Modifier and Type | Method and Description |
|---|---|
void |
check(int value,
Parameters params)
Method to overwrite for checks with constraints.
|
String |
printValue(Parameters parameters)
Print the given value from the map in Parameters in a presentable format.
|
String |
toString() |
check, checkConstraint, equals, getConstraint, getDefaultValue, getDescription, getId, getValueClass, hasDefaultValue, hashCodepublic ParameterTypeInteger(String id, String description)
id - String; short name of the new ParameterTypeIntegerdescription - String; parameter description or full name of the new ParameterTypeIntegerpublic ParameterTypeInteger(String id, String description, int defaultValue)
id - String; short name of the new ParameterTypeIntegerdescription - String; parameter description or full name of the new ParameterTypeIntegerdefaultValue - int; the default value of the new ParameterTypeIntegerpublic ParameterTypeInteger(String id, String description, Integer defaultValue)
id - String; short name of the new ParameterTypeIntegerdescription - String; parameter description or full name of the new ParameterTypeIntegerdefaultValue - Integer; the default value of the new ParameterTypeIntegerpublic ParameterTypeInteger(String id, String description, Constraint<? super Integer> constraint)
id - String; short name of the new ParameterTypeIntegerdescription - String; parameter description or full name of the new ParameterTypeIntegerconstraint - Constraint<? super Integer>; constraint for parameter valuespublic ParameterTypeInteger(String id, String description, int defaultValue, Constraint<? super Integer> constraint)
id - String; short name of the new ParameterTypeIntegerdescription - String; parameter description or full name of the new ParameterTypeIntegerdefaultValue - int; the default value of the new ParameterTypeIntegerconstraint - Constraint<? super Integer>; constraint for parameter valuespublic ParameterTypeInteger(String id, String description, Integer defaultValue, Constraint<Number> constraint)
id - String; short name of the new ParameterTypeIntegerdescription - String; parameter description or full name of the new ParameterTypeIntegerdefaultValue - Integer; the default value of the new ParameterTypeIntegerconstraint - Constraint<Number>; constraint for parameter valuespublic final String printValue(Parameters parameters) throws ParameterException
printValue in class ParameterTypeNumeric<Integer>parameters - Parameters; Parameters to get the value fromParameterException - If the parameter is not presentpublic void check(int value,
Parameters params)
throws ParameterException
value - int; Value to check with constraints.params - Parameters; Set of parameters.ParameterException - If the value does not comply with constraints.public String toString()
toString in class ParameterTypeNumeric<Integer>Copyright © 2014–2019 Delft University of Technology. All rights reserved.