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 final and immutable.
| Modifier and Type | Field and Description |
|---|---|
| private final Quantity | |
| private final Quantity | |
| private Quantity |
| Access | Constructor and Description |
|---|---|
| protected | QuantityRange(Quantity<Q>
The minimum value for the range. minimum, Quantity<Q> The maximum value for the range. maximum, Quantity<Q> The resolution of the range. resolution)Construct an instance of QuantityRange with a min, max and res value. |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | contains(final Quantity<Q> q)
Implements tech. Checks whether the given |
| public boolean | equals(final Object
the reference object with which to compare. obj)Overrides java. Indicates whether some other object is "equal to" this one. |
| private boolean | |
| private boolean | |
| public Quantity | getMaximum()
Implements tech. Returns the largest value of the range. |
| public Quantity | getMinimum()
Implements tech. Returns the smallest value of the range. |
| public Quantity | getResolution()
Implements tech. Returns the resolution of the range. |
| public int | |
| public boolean | hasMaximum()
Implements tech. Method to easily check if |
| public boolean | hasMinimum()
Implements tech. Method to easily check if |
| private boolean | |
| private boolean | |
| private static boolean | isCompatibleQuantityPair(final Quantity<Q extends Quantity<Q>> q1, final Quantity<Q extends Quantity<Q>> q2)
|
| private static boolean | |
| public static QuantityRange | Returns: anQuantityRange with the given valuesThe minimum value for the quantity range. minimum, Quantity<Q extends Quantity<Q>> The maximum value for the quantity range. maximum, Quantity<Q extends Quantity<Q>> The resolution of the quantity range. resolution)Returns an |
| public static QuantityRange | |
| public String |
| max | back to summary |
|---|---|
| private final Quantity<Q> max | |
| min | back to summary |
|---|---|
| private final Quantity<Q> min | |
| res | back to summary |
|---|---|
| private Quantity<Q> res | |
| QuantityRange | back to summary |
|---|---|
| protected QuantityRange(Quantity<Q> minimum, Quantity<Q> maximum, Quantity<Q> resolution) Construct an instance of QuantityRange with a min, max and res value. | |
| QuantityRange | back to summary |
|---|---|
| protected QuantityRange(Quantity<Q> min, Quantity<Q> max) | |
| contains | back to summary |
|---|---|
| public boolean contains(final Quantity<Q> q) Implements tech. Doc from tech. Checks whether the given
| |
| equals | back to summary |
|---|---|
| public boolean equals(final Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| fulfillsMaximumConstraint | back to summary |
|---|---|
| private boolean fulfillsMaximumConstraint(final Quantity<Q> q) | |
| fulfillsMinimumConstraint | back to summary |
|---|---|
| private boolean fulfillsMinimumConstraint(final Quantity<Q> q) | |
| getMaximum | back to summary |
|---|---|
| public Quantity Implements tech. Doc from tech. Returns the largest value of the range. The value is the same as that given as the constructor parameter for the largest value. | |
| getMinimum | back to summary |
|---|---|
| public Quantity Implements tech. Doc from tech. Returns the smallest value of the range. The value is the same as that given as the constructor parameter for the smallest value. | |
| getResolution | back to summary |
|---|---|
| public Quantity Implements tech. Doc from tech. Returns the resolution of the range. The value is the same as that given as the constructor parameter for the largest value. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| hasMaximum | back to summary |
|---|---|
| public boolean hasMaximum() Implements tech. Doc from tech. Method to easily check if
| |
| hasMinimum | back to summary |
|---|---|
| public boolean hasMinimum() Implements tech. Doc from tech. Method to easily check if
| |
| isAboveMinimum | back to summary |
|---|---|
| private boolean isAboveMinimum(final Quantity<Q> q) | |
| isBelowMaximum | back to summary |
|---|---|
| private boolean isBelowMaximum(final Quantity<Q> q) | |
| isCompatibleQuantityPair | back to summary |
|---|---|
private static boolean isCompatibleQuantityPair(final Quantity<Q extends Quantity<Q>> q1, final Quantity<Q extends Quantity<Q>> q2)
| |
| isCompatibleQuantityTriple | back to summary |
|---|---|
private static boolean isCompatibleQuantityTriple(final Quantity<Q extends Quantity<Q>> q1, final Quantity<Q extends Quantity<Q>> q2, final Quantity<Q extends Quantity<Q>> q3)
| |
| of | back to summary |
|---|---|
| public static QuantityRange Returns an
| |
| of | back to summary |
|---|---|
| public static QuantityRange Returns an
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |