Class ParameterTypeBoolean
java.lang.Object
org.opentrafficsim.base.Type<ParameterType<T>>
org.opentrafficsim.base.parameters.ParameterType<Boolean>
org.opentrafficsim.base.parameters.ParameterTypeBoolean
- All Implemented Interfaces:
Serializable,Identifiable
public class ParameterTypeBoolean extends ParameterType<Boolean> implements Serializable
Wrapper class for boolean parameters.
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.
- Version:
- $Revision$, $LastChangedDate$, by $Author$, initial version Apr 13, 2016
- Author:
- Alexander Verbraeck, Wouter Schakel
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ParameterTypeBoolean(String id, String description)Construct a new ParameterTypeBoolean without default value.ParameterTypeBoolean(String id, String description, boolean defaultValue)Construct a new ParameterTypeBoolean with default value. -
Method Summary
Modifier and Type Method Description StringprintValue(Parameters parameters)Print the given value from the map in Parameters in a presentable format.StringtoString()Methods inherited from class org.opentrafficsim.base.parameters.ParameterType
check, checkConstraint, equals, getConstraint, getDefaultValue, getDescription, getId, getValueClass, hasDefaultValue, hashCode
-
Constructor Details
-
ParameterTypeBoolean
Construct a new ParameterTypeBoolean without default value.- Parameters:
id- String; short name of the new ParameterTypeBooleandescription- String; parameter description or full name of the new ParameterTypeBoolean
-
ParameterTypeBoolean
Construct a new ParameterTypeBoolean with default value.- Parameters:
id- String; short name of the new ParameterTypeBooleandescription- String; parameter description or full name of the new ParameterTypeBooleandefaultValue- boolean; the default value of the new ParameterTypeBoolean
-
-
Method Details
-
printValue
Print the given value from the map in Parameters in a presentable format. The default implementation simply returns the output of toString().- Overrides:
printValuein classParameterType<Boolean>- Parameters:
parameters- Parameters; Parameters to get the value from- Returns:
- String; readable representation of the value
- Throws:
ParameterException- If the parameter is not present
-
toString
- Overrides:
toStringin classParameterType<Boolean>
-