Q
- The value of the range.public class QuantityRange<Q extends javax.measure.Quantity<Q>> extends Range<javax.measure.Quantity<Q>>
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.
Modifier | Constructor | Description |
---|---|---|
protected |
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) |
Modifier and Type | Method | Description |
---|---|---|
boolean |
contains(javax.measure.Quantity<Q> q) |
Checks whether the given
T is within this range |
boolean |
equals(Object obj) |
|
int |
hashCode() |
|
static QuantityRange |
of(javax.measure.Quantity minimum,
javax.measure.Quantity maximum) |
Returns an
QuantityRange with the specified values. |
static QuantityRange |
of(javax.measure.Quantity minimum,
javax.measure.Quantity maximum,
javax.measure.Quantity resolution) |
Returns an
QuantityRange with the specified values. |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getMaximum, getMinimum, getResolution, hasMaximum, hasMinimum
protected QuantityRange(javax.measure.Quantity<Q> min, javax.measure.Quantity<Q> max, javax.measure.Quantity<Q> resolution)
protected QuantityRange(javax.measure.Quantity<Q> min, javax.measure.Quantity<Q> max)
public static QuantityRange of(javax.measure.Quantity minimum, javax.measure.Quantity maximum, javax.measure.Quantity resolution)
QuantityRange
with the specified values.minimum
- The minimum value for the quantity range.maximum
- The maximum value for the quantity range.resolution
- The resolution of the quantity range.QuantityRange
with the given valuespublic static QuantityRange of(javax.measure.Quantity minimum, javax.measure.Quantity maximum)
QuantityRange
with the specified values.minimum
- The minimum value for the quantity range.maximum
- The maximum value for the quantity range.QuantityRange
with the given valuespublic boolean contains(javax.measure.Quantity<Q> q)
Range
T
is within this rangepublic int hashCode()
Copyright © 2005–2020 Units of Measurement project. All rights reserved.