java.lang.Object
io.github.palexdev.materialfx.beans.NumberRange<T>
- Type Parameters:
T- The type of Number to represent
Simple bean to represent a range of values from min to max.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanexpandRange(int min, int max) Expands a range of integers to a List of integers.expandRange(NumberRange<Integer> range) Expands a range of integers to a List of integers.static Integer[]expandRangeToArray(int min, int max) Expands a range of integers to an array of integers.expandRangeToSet(int min, int max) Expands a range of integers to a Set of integers.expandRangeToSet(NumberRange<Integer> range) Expands a range of integers to a Set of integers.getMax()getMin()inthashCode()static booleaninRangeOf(double val, NumberRange<Double> range) Checks if the given value is contained in the given range (bounds are included).static booleaninRangeOf(double val, List<NumberRange<Double>> ranges) Checks if the given value is contained in any of the given ranges (bounds are included).static booleaninRangeOf(float val, NumberRange<Float> range) Checks if the given value is contained in the given range (bounds are included).static booleaninRangeOf(float val, List<NumberRange<Float>> ranges) Checks if the given value is contained in any of the given ranges (bounds are included).static booleaninRangeOf(int val, NumberRange<Integer> range) Checks if the given value is contained in the given range (bounds are included).static booleaninRangeOf(int val, List<NumberRange<Integer>> ranges) Checks if the given value is contained in any of the given ranges (bounds are included).static booleaninRangeOf(long val, NumberRange<Long> range) Checks if the given value is contained in the given range (bounds are included).static booleaninRangeOf(long val, List<NumberRange<Long>> ranges) Checks if the given value is contained in any of the given ranges (bounds are included).static <T extends Number>
NumberRange<T>of(T val) Returns a new instance of NumberRange with the given val as both min and max bounds.static <T extends Number>
NumberRange<T>of(T min, T max) Returns a new instance of NumberRange with the given min and max bounds.toString()
-
Constructor Details
-
NumberRange
-
-
Method Details
-
getMin
- Returns:
- the lower bound
-
getMax
- Returns:
- the upper bound
-
equals
-
hashCode
public int hashCode() -
toString
-
of
Returns a new instance of NumberRange with the given min and max bounds. -
of
Returns a new instance of NumberRange with the given val as both min and max bounds. -
inRangeOf
Checks if the given value is contained in the given range (bounds are included). -
inRangeOf
Checks if the given value is contained in the given range (bounds are included). -
inRangeOf
Checks if the given value is contained in the given range (bounds are included). -
inRangeOf
Checks if the given value is contained in the given range (bounds are included). -
inRangeOf
Checks if the given value is contained in any of the given ranges (bounds are included). -
inRangeOf
Checks if the given value is contained in any of the given ranges (bounds are included). -
inRangeOf
Checks if the given value is contained in any of the given ranges (bounds are included). -
inRangeOf
Checks if the given value is contained in any of the given ranges (bounds are included). -
expandRange
Expands a range of integers to a List of integers. -
expandRange
Expands a range of integers to a List of integers. -
expandRangeToSet
Expands a range of integers to a Set of integers. -
expandRangeToSet
Expands a range of integers to a Set of integers. -
expandRangeToArray
Expands a range of integers to an array of integers.
-