T - Class of the value.public abstract class ParameterTypeNumeric<T extends Number> extends ParameterType<T> 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 |
|---|
ParameterTypeNumeric(String id,
String description,
Class<T> valueClass)
Constructor without default value and check.
|
ParameterTypeNumeric(String id,
String description,
Class<T> valueClass,
Constraint<? super T> constraint)
Constructor without default value, with check.
|
ParameterTypeNumeric(String id,
String description,
Class<T> valueClass,
T defaultValue)
Constructor with default value, without check.
|
ParameterTypeNumeric(String id,
String description,
Class<T> valueClass,
T defaultValue,
Constraint<? super T> constraint)
Constructor with default value and check.
|
| Modifier and Type | Method and Description |
|---|---|
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 ParameterTypeNumeric(String id, String description, Class<T> valueClass)
id - String; Short name of parameter.description - String; Parameter description or full name.valueClass - Class<T>; Class of the value.public ParameterTypeNumeric(String id, String description, Class<T> valueClass, T defaultValue)
id - String; Short name of parameter.description - String; Parameter description or full name.valueClass - Class<T>; Class of the value.defaultValue - T; Default value.public ParameterTypeNumeric(String id, String description, Class<T> valueClass, Constraint<? super T> constraint)
id - String; Short name of parameter.description - String; Parameter description or full name.valueClass - Class<T>; Class of the value.constraint - Constraint<? super T>; Constraint for parameter values.public ParameterTypeNumeric(String id, String description, Class<T> valueClass, T defaultValue, Constraint<? super T> constraint)
id - String; Short name of parameter.description - String; Parameter description or full name.valueClass - Class<T>; Class of the value.defaultValue - T; Default value.constraint - Constraint<? super T>; Constraint for parameter values.public String printValue(Parameters parameters) throws ParameterException
printValue in class ParameterType<T extends Number>parameters - Parameters; Parameters to get the value fromParameterException - If the parameter is not presentpublic String toString()
toString in class ParameterType<T extends Number>Copyright © 2014–2019 Delft University of Technology. All rights reserved.