Class FloatParameter

All Implemented Interfaces:
Displayable, LimitableParameter, Parameter, SingleParameter

public class FloatParameter
extends AbstractLimitableParameter
Parameter that can contain Float/float values.
Version:
2.6.5
Recent revisions:
2.6.5
  • Constructor Details

    • FloatParameter

      public FloatParameter​(String name, String description)
      Constructs a new float parameter.
      Parameters:
      name - the name of the parameter.
      description - the description of the parameter.
    • FloatParameter

      public FloatParameter​(Float value, String name, String description)
      Constructs a new Float parameter.
      Parameters:
      value - the new Float value. May be null.
      name - the name of the parameter.
      description - the description of the parameter.
    • FloatParameter

      public FloatParameter​(Float value, Float min, Float max, String name, String description)
      Constructs a new Float parameter.
      Parameters:
      value - the new Float value. May be null.
      min - the minimum value.
      max - the maximum value.
      name - the name of the parameter.
      description - the description of the parameter.
    • FloatParameter

      public FloatParameter​(Float value, Float min, Float max, Float distance, String name, String description)
      Constructs a new Float parameter.
      Parameters:
      value - the new Float value. May be null.
      min - the minimum value.
      max - the maximum value.
      distance - the distance between any two points in the [min, max] interval.
      name - the name of the parameter.
      description - the description of the parameter.
    • FloatParameter

      public FloatParameter​(Float value, Float distance, String name, String description)
      Constructs a new Float parameter.
      Parameters:
      value - the new Float value. May be null.
      distance - the distance between any two points in the open interval.
      name - the name of the parameter.
      description - the description of the parameter.
  • Method Details

    • getFloat

      public Float getFloat()
      Returns the value of this parameter as a Float.
      Returns:
      the value of this parameter as a Float.
    • getMax

      public Comparable<Float> getMax()
      Returns the max defined value of this Float parameter.
      Returns:
      maximal Float value of this parameter or in general
    • getMin

      public Comparable<Float> getMin()
      Returns the min defined value of this Float parameter.
      Returns:
      manimal Float value of this parameter or in general
    • isValid

      public boolean isValid()
      Description copied from interface: LimitableParameter
      Returns true if the value is between the minimum and the maximum, false otherwise.
      Returns:
      true if the value is between the minimum and the maximum, false otherwise.
    • setValue

      public void setValue​(Object value)
      Sets the value of the AttributeParameter.
      Specified by:
      setValue in interface Displayable
      Overrides:
      setValue in class AbstractSingleParameter
      Parameters:
      value - the new value of the AttributeParameter.
    • setMax

      public void setMax​(Float max)
    • setMin

      public void setMin​(Float min)
    • setValuesBallSize

      public void setValuesBallSize​(Float ball)
      Set new intervalue distance.
      Parameters:
      ball - the change-size between two valid values
    • getValuesBall

      public Number getValuesBall()
      Description copied from class: AbstractLimitableParameter
      The closed ball diameter exclusive for the current parameter value, such that

      v(t) = val
      v(t+1) = (val +|- ballDiameter)

      whereas t stands for time point.
      Specified by:
      getValuesBall in class AbstractLimitableParameter
      Returns:
      a Number instance
    • getValue

      public Object getValue()
      Returns the value of this parameter.
      Specified by:
      getValue in interface Displayable
      Overrides:
      getValue in class AbstractSingleParameter
      Returns:
      the value of this parameter.