Class InputParameterDouble
java.lang.Object
nl.tudelft.simulation.dsol.model.inputparameters.AbstractInputParameter<Double,Double>
nl.tudelft.simulation.dsol.model.inputparameters.InputParameterDouble
- All Implemented Interfaces:
Serializable
,Cloneable
,InputParameter<Double,
Double>
InputParameterDouble.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
ConstructorDescriptionInputParameterDouble
(String key, String shortName, String description, double defaultValue, double displayPriority) Construct a new InputParameterDouble.InputParameterDouble
(String key, String shortName, String description, double defaultValue, double minimumValue, double maximumValue, boolean minIncluded, boolean maxIncluded, String format, double displayPriority) Construct a new InputParameterDouble. -
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
setDoubleValue
(double newValue) Check and set the typed value, and call super.setValue to make the actual allocation.void
void
setMaximumValue
(double maximumValue) void
setMaxIncluded
(boolean maxIncluded) void
setMinimumValue
(double 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
-
InputParameterDouble
public InputParameterDouble(String key, String shortName, String description, double defaultValue, double displayPriority) Construct a new InputParameterDouble.- Parameters:
key
- String; unique (within the parent's input parameter map) name of the new InputParameterDoubleshortName
- String; concise description of the input parameterdescription
- String; double description of the input parameter (may use HTML markup)defaultValue
- double; 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
-
InputParameterDouble
public InputParameterDouble(String key, String shortName, String description, double defaultValue, double minimumValue, double maximumValue, boolean minIncluded, boolean maxIncluded, String format, double displayPriority) Construct a new InputParameterDouble.- Parameters:
key
- String; unique (within the parent's input parameter map) name of the new InputParameterDoubleshortName
- String; concise description of the input parameterdescription
- String; double description of the input parameter (may use HTML markup)defaultValue
- double; the default value of this input parameterminimumValue
- double; the lowest value allowed as inputmaximumValue
- double; 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 doubledisplayPriority
- 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
-
setDoubleValue
Check and set the typed value, and call super.setValue to make the actual allocation.- Parameters:
newValue
- double; 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
-
getMinimumValue
- Returns:
- minimumValue
-
setMinimumValue
public void setMinimumValue(double minimumValue) - Parameters:
minimumValue
- double; set minimumValue
-
getMaximumValue
- Returns:
- maximumValue
-
setMaximumValue
public void setMaximumValue(double maximumValue) - Parameters:
maximumValue
- double; 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<Double,
Double> - Overrides:
clone
in classAbstractInputParameter<Double,
Double> - Returns:
- a deep copy of the InputParameter
-