Class InputParameterFloat
java.lang.Object
nl.tudelft.simulation.dsol.model.inputparameters.AbstractInputParameter<Float,Float>
nl.tudelft.simulation.dsol.model.inputparameters.InputParameterFloat
- All Implemented Interfaces:
Serializable
,Cloneable
,InputParameter<Float,
Float>
InputParameterFloat.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
ConstructorDescriptionInputParameterFloat
(String key, String shortName, String description, float defaultValue, double displayPriority) Construct a new InputParameterFloat.InputParameterFloat
(String key, String shortName, String description, float defaultValue, float minimumValue, float maximumValue, boolean minIncluded, boolean maxIncluded, String format, double displayPriority) Construct a new InputParameterFloat. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Provide the clone() method to make a deep copy.Retrieve the calculated value of the input parameter.boolean
boolean
void
setFloatValue
(float newValue) Check and set the typed value, and call super.setValue to make the actual allocation.void
void
setMaximumValue
(float maximumValue) void
setMaxIncluded
(boolean maxIncluded) void
setMinimumValue
(float minimumValue) void
setMinIncluded
(boolean minIncluded) 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
-
InputParameterFloat
public InputParameterFloat(String key, String shortName, String description, float defaultValue, double displayPriority) Construct a new InputParameterFloat.- Parameters:
key
- String; unique (within the parent's input parameter map) name of the new InputParameterFloatshortName
- String; concise description of the input parameterdescription
- String; float description of the input parameter (may use HTML markup)defaultValue
- float; 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
-
InputParameterFloat
public InputParameterFloat(String key, String shortName, String description, float defaultValue, float minimumValue, float maximumValue, boolean minIncluded, boolean maxIncluded, String format, double displayPriority) Construct a new InputParameterFloat.- Parameters:
key
- String; unique (within the parent's input parameter map) name of the new InputParameterFloatshortName
- String; concise description of the input parameterdescription
- String; float description of the input parameter (may use HTML markup)defaultValue
- float; the default value of this input parameterminimumValue
- float; the lowest value allowed as inputmaximumValue
- float; the highest value allowed as inputminIncluded
- boolean; is the minimum value included or excluded in the allowed interval?maxIncluded
- boolean; is the maximum value included or excluded in the allowed interval?format
- String; the format to use in displaying the floatdisplayPriority
- double; sorting order when properties are displayed to the user- Throws:
NullPointerException
- when key, shortName, defaultValue, description, or format 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
-
setFloatValue
Check and set the typed value, and call super.setValue to make the actual allocation.- Parameters:
newValue
- float; the new value for the input parameter- Throws:
InputParameterException
- when this InputParameter is read-only, or newValue is not valid
-
getFormat
- Returns:
- format
-
setFormat
- Parameters:
format
- String; set format- Throws:
NullPointerException
- when format is null
-
getMinimumValue
- Returns:
- minimumValue
-
setMinimumValue
public void setMinimumValue(float minimumValue) - Parameters:
minimumValue
- float; set minimumValue
-
getMaximumValue
- Returns:
- maximumValue
-
setMaximumValue
public void setMaximumValue(float maximumValue) - Parameters:
maximumValue
- float; set maximumValue
-
isMinIncluded
public boolean isMinIncluded()- Returns:
- minIncluded
-
setMinIncluded
public void setMinIncluded(boolean minIncluded) - Parameters:
minIncluded
- boolean; set minIncluded
-
isMaxIncluded
public boolean isMaxIncluded()- Returns:
- maxIncluded
-
setMaxIncluded
public void setMaxIncluded(boolean maxIncluded) - Parameters:
maxIncluded
- boolean; set maxIncluded
-
clone
Provide the clone() method to make a deep copy.- Specified by:
clone
in interfaceInputParameter<Float,
Float> - Overrides:
clone
in classAbstractInputParameter<Float,
Float> - Returns:
- a deep copy of the InputParameter
-