Q - Unit of this quantitypublic final class EmptyQuantity<Q extends javax.measure.Quantity<Q>>
extends tech.units.indriya.AbstractQuantity<Q>
Quantity<Length>
length = null;" you should use "Quantity<Length> length =
EmptyQuantity.of(Units.METRE);" Possible application cases are e.g. time series consisting of several quantities based on real
data. As real time series sometimes might lack some values, it is preferred to indicate that that
these values are missing in the input data by providing an instance of EmptyQuantity
instead of using null. This is motivated by making the missing value explicit, instead of
implicitly assuming that null represents a missing value.
| Modifier and Type | Method and Description |
|---|---|
tech.units.indriya.ComparableQuantity<Q> |
add(javax.measure.Quantity<Q> that)
Deprecated.
EmptyQuantity represents a 'null' value, so you should not perform any operations
on this Quantity
|
tech.units.indriya.ComparableQuantity<Q> |
divide(java.lang.Number that)
Deprecated.
EmptyQuantity represents a 'null' value, so you should not perform any operations
on this Quantity
|
tech.units.indriya.ComparableQuantity<?> |
divide(javax.measure.Quantity<?> that)
Deprecated.
EmptyQuantity represents a 'null' value, so you should not perform any operations
on this Quantity
|
boolean |
equals(java.lang.Object that)
Decides equality based only on the type of the object: If it is an EmptyQuantity, it is
equal.
|
java.lang.Number |
getValue()
Returns always null, as that is the only value an EmptyQuantity can and should have
|
int |
hashCode()
Deprecated.
EmptyQuantity represents a 'null' value, so you should not perform any operations
on this Quantity
|
tech.units.indriya.ComparableQuantity<?> |
inverse()
Deprecated.
EmptyQuantity represents a 'null' value, so you should not perform any operations
on this Quantity
|
boolean |
isEquivalentTo(javax.measure.Quantity that)
Decides equality based only on the type of the quantity: If it is an EmptyQuantity, it
is equal.
|
tech.units.indriya.ComparableQuantity<Q> |
multiply(java.lang.Number multiplier)
Deprecated.
EmptyQuantity represents a 'null' value, so you should not perform any operations
on this Quantity
|
tech.units.indriya.ComparableQuantity<?> |
multiply(javax.measure.Quantity<?> multiplier)
Deprecated.
EmptyQuantity represents a 'null' value, so you should not perform any operations
on this Quantity
|
javax.measure.Quantity<Q> |
negate()
Deprecated.
EmptyQuantity represents a 'null' value, so you should not perform any operations
on this Quantity
|
static <U extends javax.measure.Quantity<U>> |
of(javax.measure.Unit<U> unit)
Initializes an EmptyQuantity with the specified Unit
|
tech.units.indriya.ComparableQuantity<Q> |
subtract(javax.measure.Quantity<Q> that)
Deprecated.
EmptyQuantity represents a 'null' value, so you should not perform any operations
on this Quantity
|
asType, compareTo, divide, getScale, getUnit, hasFraction, hasFraction, inverse, isGreaterThan, isGreaterThanOrEqualTo, isLessThan, isLessThanOrEqualTo, multiply, numberSystem, parse, to, toStringpublic static <U extends javax.measure.Quantity<U>> EmptyQuantity<U> of(javax.measure.Unit<U> unit)
U - The Unit/Quantity type of the EmptyQuantity objectunit - The Unit for the EmptyQuantitypublic java.lang.Number getValue()
getValue in interface javax.measure.Quantity<Q extends javax.measure.Quantity<Q>>getValue in interface tech.uom.lib.common.function.ValueSupplier<java.lang.Number>getValue in class tech.units.indriya.AbstractQuantity<Q extends javax.measure.Quantity<Q>>@Deprecated public tech.units.indriya.ComparableQuantity<Q> add(javax.measure.Quantity<Q> that)
that - Quantity to perform the operation on@Deprecated public tech.units.indriya.ComparableQuantity<Q> subtract(javax.measure.Quantity<Q> that)
that - Quantity to perform the operation on@Deprecated public tech.units.indriya.ComparableQuantity<?> divide(javax.measure.Quantity<?> that)
that - Quantity to perform the operation on@Deprecated public tech.units.indriya.ComparableQuantity<Q> divide(java.lang.Number that)
that - Quantity to perform the operation on@Deprecated public tech.units.indriya.ComparableQuantity<?> multiply(javax.measure.Quantity<?> multiplier)
multiplier - Quantity to perform the operation on@Deprecated public tech.units.indriya.ComparableQuantity<Q> multiply(java.lang.Number multiplier)
multiplier - Quantity to perform the operation on@Deprecated public tech.units.indriya.ComparableQuantity<?> inverse()
@Deprecated public javax.measure.Quantity<Q> negate()
public boolean equals(java.lang.Object that)
@Deprecated public int hashCode()
public boolean isEquivalentTo(javax.measure.Quantity that)
equals(Object) method.