Class Range<T>
java.lang.Object
tech.units.indriya.spi.Range<T>
- Type Parameters:
T- The value of the range.
- All Implemented Interfaces:
tech.uom.lib.common.function.MaximumSupplier<T>, tech.uom.lib.common.function.MinimumSupplier<T>
- Direct Known Subclasses:
QuantityRange
public abstract class Range<T>
extends Object
implements tech.uom.lib.common.function.MinimumSupplier<T>, tech.uom.lib.common.function.MaximumSupplier<T>
A Range is a pair of
T items that represent a range of values.
Subclasses of Range should be immutable.
- Since:
- 1.0
- Version:
- 1.0, December 29, 2017
- Author:
- Werner Keil
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract booleanChecks whether the givenTis within this rangebooleanReturns the largest value of the range.Returns the smallest value of the range.Returns the resolution of the range.inthashCode()booleanMethod to easily check ifgetMaximum()is notnull.booleanMethod to easily check ifgetMinimum()is notnull.toString()
-
Constructor Details
-
Range
-
Range
-
-
Method Details
-
getMinimum
Returns the smallest value of the range. The value is the same as that given as the constructor parameter for the smallest value.- Specified by:
getMinimumin interfacetech.uom.lib.common.function.MinimumSupplier<T>- Returns:
- the minimum value
-
getMaximum
Returns the largest value of the range. The value is the same as that given as the constructor parameter for the largest value.- Specified by:
getMaximumin interfacetech.uom.lib.common.function.MaximumSupplier<T>- Returns:
- the maximum value
-
getResolution
Returns the resolution of the range. The value is the same as that given as the constructor parameter for the largest value.- Returns:
- resolution of the range, the value is the same as that given as the constructor parameter for the resolution
-
hasMinimum
Method to easily check ifgetMinimum()is notnull.- Returns:
trueifgetMinimum()is notnull.
-
hasMaximum
Method to easily check ifgetMaximum()is notnull.- Returns:
trueifgetMaximum()is notnull.
-
contains
-
equals
-
hashCode
-
toString
-