Class InputParameterLong
java.lang.Object
nl.tudelft.simulation.dsol.model.inputparameters.AbstractInputParameter<Long,Long>
nl.tudelft.simulation.dsol.model.inputparameters.InputParameterLong
- All Implemented Interfaces:
Serializable
,Cloneable
,InputParameter<Long,
Long>
InputParameterLong.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
ConstructorDescriptionInputParameterLong
(String key, String shortName, String description, long defaultValue, double displayPriority) Construct a new InputParameterLong.InputParameterLong
(String key, String shortName, String description, long defaultValue, long minimumValue, long maximumValue, String format, double displayPriority) Construct a new InputParameterLong. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Provide the clone() method to make a deep copy.Retrieve the calculated value of the input parameter.void
void
setLongValue
(long newValue) Check and set the typed value, and call super.setValue to make the actual allocation.void
setMaximumValue
(long maximumValue) void
setMinimumValue
(long minimumValue) 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
-
InputParameterLong
public InputParameterLong(String key, String shortName, String description, long defaultValue, double displayPriority) Construct a new InputParameterLong.- Parameters:
key
- String; unique (within the parent's input parameter map) name of the new InputParameterLongshortName
- String; concise description of the input parameterdescription
- String; long description of the input parameter (may use HTML markup)defaultValue
- long; 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
-
InputParameterLong
public InputParameterLong(String key, String shortName, String description, long defaultValue, long minimumValue, long maximumValue, String format, double displayPriority) Construct a new InputParameterLong.- Parameters:
key
- String; unique (within the parent's input parameter map) name of the new InputParameterLongshortName
- String; concise description of the input parameterdescription
- String; long description of the input parameter (may use HTML markup)defaultValue
- long; the default value of this input parameterminimumValue
- long; the lowest value allowed as inputmaximumValue
- long; the highest value allowed as inputformat
- String; the format to use in displaying the longdisplayPriority
- 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
-
setLongValue
Check and set the typed value, and call super.setValue to make the actual allocation.- Parameters:
newValue
- long; 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(long minimumValue) - Parameters:
minimumValue
- long; set minimumValue
-
getMaximumValue
- Returns:
- maximumValue
-
setMaximumValue
public void setMaximumValue(long maximumValue) - Parameters:
maximumValue
- long; set maximumValue
-
clone
Provide the clone() method to make a deep copy.- Specified by:
clone
in interfaceInputParameter<Long,
Long> - Overrides:
clone
in classAbstractInputParameter<Long,
Long> - Returns:
- a deep copy of the InputParameter
-