java.lang.Object
eu.hansolo.toolbox.Range
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(double value) Returns true if value is in rangedoublegetMax()doublegetMin()static intisValueInRange(double value, Range range) Returns -1 if value is smaller than minValue 1 if value is greater than maxValue 0 if value is in rangevoidsetMax(double max) voidsetMin(double min) toString()
-
Constructor Details
-
Range
public Range(double min, double max)
-
-
Method Details
-
getMin
public double getMin() -
setMin
public void setMin(double min) -
minProperty
-
getMax
public double getMax() -
setMax
public void setMax(double max) -
maxProperty
-
contains
public boolean contains(double value) Returns true if value is in range- Parameters:
value-- Returns:
- true if value is in range
-
isValueInRange
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
-