T
- The value of the range.public abstract class Range<T> extends Object implements tec.uom.lib.common.function.MinimumSupplier<T>, tec.uom.lib.common.function.MaximumSupplier<T>
T
items that represent a range of values.
Range limits MUST be presented in the same scale and have the same unit as measured data values.
Subclasses of Range should be immutable.
Modifier | Constructor and Description |
---|---|
protected |
Range(T min,
T max)
Construct an instance of Range with a min and max value.
|
protected |
Range(T min,
T max,
T res)
Construct an instance of Range with a min, max and res value.
|
Modifier and Type | Method and Description |
---|---|
abstract boolean |
contains(T t)
Checks whether the given
T is within this range |
boolean |
equals(Object obj) |
T |
getMaximum()
Returns the largest value of the measurement range.
|
T |
getMinimum()
Returns the smallest value of the range.
|
T |
getResolution()
Returns the resolution of the measurement range.
|
int |
hashCode() |
boolean |
hasMaximum()
Method to easily check if
getMaximum() is not null . |
boolean |
hasMinimum()
Method to easily check if
getMinimum() is not null . |
String |
toString() |
protected Range(T min, T max, T res)
min
- The minimum value for the measurement range.max
- The maximum value for the measurement range.res
- The resolution of the measurement range.public T getMinimum()
getMinimum
in interface tec.uom.lib.common.function.MinimumSupplier<T>
public T getMaximum()
getMaximum
in interface tec.uom.lib.common.function.MaximumSupplier<T>
public T getResolution()
public boolean hasMinimum()
getMinimum()
is not null
.true
if getMinimum()
is not null
.public boolean hasMaximum()
getMaximum()
is not null
.true
if getMaximum()
is not null
.public abstract boolean contains(T t)
T
is within this ranget
- Copyright © 2005–2017 Units of Measurement project. All rights reserved.