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>

public class InputParameterFloat extends AbstractInputParameter<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.
Author:
Alexander Verbraeck
See Also:
  • 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 InputParameterFloat
      shortName - String; concise description of the input parameter
      description - String; float description of the input parameter (may use HTML markup)
      defaultValue - float; 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
    • 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 InputParameterFloat
      shortName - String; concise description of the input parameter
      description - String; float description of the input parameter (may use HTML markup)
      defaultValue - float; the default value of this input parameter
      minimumValue - float; the lowest value allowed as input
      maximumValue - float; the highest value allowed as input
      minIncluded - 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 float
      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 Float 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

      public void setFloatValue(float newValue) throws InputParameterException
      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

      public String getFormat()
      Returns:
      format
    • setFormat

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

      public Float getMinimumValue()
      Returns:
      minimumValue
    • setMinimumValue

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

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

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