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