Package tech.units.indriya.quantity
Class QuantityRange<Q extends javax.measure.Quantity<Q>>
java.lang.Object
tech.units.indriya.spi.Range<javax.measure.Quantity<Q>>
tech.units.indriya.quantity.QuantityRange<Q>
- Type Parameters:
Q
- The value of the range.
- All Implemented Interfaces:
tech.uom.lib.common.function.MaximumSupplier<javax.measure.Quantity<Q>>
,tech.uom.lib.common.function.MinimumSupplier<javax.measure.Quantity<Q>>
public class QuantityRange<Q extends javax.measure.Quantity<Q>>
extends Range<javax.measure.Quantity<Q>>
A Quantity Range is a pair of
Quantity
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 QuantityRange should be immutable.
- Version:
- 0.5, December 29, 2017
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
QuantityRange
(javax.measure.Quantity<Q> min, javax.measure.Quantity<Q> max) protected
QuantityRange
(javax.measure.Quantity<Q> min, javax.measure.Quantity<Q> max, javax.measure.Quantity<Q> resolution) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks whether the givenT
is within this rangeboolean
static QuantityRange
of
(javax.measure.Quantity minimum, javax.measure.Quantity maximum) Returns anQuantityRange
with the specified values.static QuantityRange
of
(javax.measure.Quantity minimum, javax.measure.Quantity maximum, javax.measure.Quantity resolution) Returns anQuantityRange
with the specified values.toString()
Methods inherited from class tech.units.indriya.spi.Range
getMaximum, getMinimum, getResolution, hashCode, hasMaximum, hasMinimum
-
Constructor Details
-
QuantityRange
-
QuantityRange
-
-
Method Details
-
of
public static QuantityRange of(javax.measure.Quantity minimum, javax.measure.Quantity maximum, javax.measure.Quantity resolution) Returns anQuantityRange
with the specified values.- Parameters:
minimum
- The minimum value for the quantity range.maximum
- The maximum value for the quantity range.resolution
- The resolution of the quantity range.- Returns:
- an
QuantityRange
with the given values
-
of
Returns anQuantityRange
with the specified values.- Parameters:
minimum
- The minimum value for the quantity range.maximum
- The maximum value for the quantity range.- Returns:
- a
QuantityRange
with the given values
-
contains
Description copied from class:Range
Checks whether the givenT
is within this range -
equals
-
toString
-