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>

public class InputParameterInteger extends AbstractInputParameter<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.
Author:
Alexander Verbraeck
See Also:
  • 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 InputParameterInteger
      shortName - String; concise description of the input parameter
      description - String; long description of the input parameter (may use HTML markup)
      defaultValue - int; the default value of this input parameter
      displayPriority - double; sorting order when properties are displayed to the user
      Throws:
      NullPointerException - when key, shortName, defaultValue, or description is null
      IllegalArgumentException - 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 InputParameterInteger
      shortName - String; concise description of the input parameter
      description - String; long description of the input parameter (may use HTML markup)
      defaultValue - int; the default value of this input parameter
      minimumValue - int; the lowest value allowed as input
      maximumValue - int; the highest value allowed as input
      format - String; the format to use in displaying the integer
      displayPriority - double; sorting order when properties are displayed to the user
      Throws:
      NullPointerException - when key, shortName, defaultValue, description, or format is null
      IllegalArgumentException - when displayPriority is NaN
  • Method Details

    • getCalculatedValue

      public Integer 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

      public void setIntValue(int newValue) throws InputParameterException
      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

      public String getFormat()
      Returns:
      format
    • setFormat

      public void setFormat(String format)
      Parameters:
      format - String; set format
      Throws:
      NullPointerException - when format is null
    • getMinimumValue

      public Integer getMinimumValue()
      Returns:
      minimumValue
    • setMinimumValue

      public void setMinimumValue(int minimumValue)
      Parameters:
      minimumValue - int; set minimumValue
    • getMaximumValue

      public Integer getMaximumValue()
      Returns:
      maximumValue
    • setMaximumValue

      public void setMaximumValue(int maximumValue)
      Parameters:
      maximumValue - int; set maximumValue
    • clone

      public InputParameterInteger clone()
      Provide the clone() method to make a deep copy.
      Specified by:
      clone in interface InputParameter<Integer,Integer>
      Overrides:
      clone in class AbstractInputParameter<Integer,Integer>
      Returns:
      a deep copy of the InputParameter