Class InputParameterBoolean
java.lang.Object
nl.tudelft.simulation.dsol.model.inputparameters.AbstractInputParameter<Boolean,Boolean>
nl.tudelft.simulation.dsol.model.inputparameters.InputParameterBoolean
- All Implemented Interfaces:
Serializable
,Cloneable
,InputParameter<Boolean,
Boolean>
InputParameterBoolean.java.
Copyright (c) 2003-2024 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information www.simulation.tudelft.nl. The source code and binary code of this software is proprietary information of Delft University of Technology.
Copyright (c) 2003-2024 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information www.simulation.tudelft.nl. The source code and binary code of this software is proprietary information of Delft University of Technology.
- Author:
- Alexander Verbraeck
- See Also:
-
Constructor Summary
ConstructorDescriptionInputParameterBoolean
(String key, String shortName, String description, boolean defaultValue, double displayPriority) Construct a new InputParameterBoolean. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Provide the clone() method to make a deep copy.Retrieve the calculated value of the input parameter.void
setBooleanValue
(boolean newValue) Check and set the typed value, and call super.setValue to make the actual allocation.Methods inherited from class nl.tudelft.simulation.dsol.model.inputparameters.AbstractInputParameter
getDefaultValue, getDescription, getDisplayPriority, getExtendedKey, getKey, getParent, getShortName, getValue, isReadOnly, setDefaultValue, setParent, setReadOnly, setValue, toString
-
Constructor Details
-
InputParameterBoolean
public InputParameterBoolean(String key, String shortName, String description, boolean defaultValue, double displayPriority) Construct a new InputParameterBoolean.- Parameters:
key
- String; unique (within the parent's input parameter map) name of the new InputParameterBooleanshortName
- String; concise description of the input parameterdescription
- String; long description of the input parameter (may use HTML markup)defaultValue
- boolean; the default value of this input parameterdisplayPriority
- double; sorting order when properties are displayed to the user- Throws:
NullPointerException
- when key, shortName, defaultValue, or description is nullIllegalArgumentException
- when displayPriority is NaN
-
-
Method Details
-
getCalculatedValue
Retrieve the calculated value of the input parameter. This is often the same as the value type, except in situations where a sub-map or sub-list calculates a different value. This is, for instance, the case with distribution functions where the parameters are present in a sub-map (the value) and the return type of the value is a distribution function class.- Returns:
- CT; the calculated value of the input parameter
-
setBooleanValue
Check and set the typed value, and call super.setValue to make the actual allocation.- Parameters:
newValue
- boolean; the new value for the input parameter- Throws:
InputParameterException
- when this InputParameter is read-only, or newValue is not valid
-
clone
Provide the clone() method to make a deep copy.- Specified by:
clone
in interfaceInputParameter<Boolean,
Boolean> - Overrides:
clone
in classAbstractInputParameter<Boolean,
Boolean> - Returns:
- a deep copy of the InputParameter
-