Class Range

java.lang.Object
eu.hansolo.toolbox.Range

public class Range extends Object
  • Constructor Details

    • Range

      public Range(double min, double max)
  • Method Details

    • getMin

      public double getMin()
    • setMin

      public void setMin(double min)
    • minProperty

      public DoubleProperty minProperty()
    • getMax

      public double getMax()
    • setMax

      public void setMax(double max)
    • maxProperty

      public DoubleProperty maxProperty()
    • contains

      public boolean contains(double value)
      Returns true if value is in range
      Parameters:
      value -
      Returns:
      true if value is in range
    • isValueInRange

      public static int isValueInRange(double value, Range range)
      Returns -1 if value is smaller than minValue 1 if value is greater than maxValue 0 if value is in range
      Parameters:
      value -
      Returns:
      -1 if value is smaller than minValue, 1 if value is greater than maxValue, otherwise returns 0
    • toString

      public String toString()
      Overrides:
      toString in class Object