ComparableQuantity that holds a Java Number,
which represented this quantity's amount.
This object is immutable.
AbstractQuantity, Quantity, ComparableQuantity
| Modifier and Type | Field and Description |
|---|---|
| private static final long | |
| private final Number |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public ComparableQuantity | add(Quantity<Q>
the that)Quantity to be added.Implements tech. Returns the sum of this |
| public ComparableQuantity | divide(Quantity<?>
the that)Quantity divisor.Implements tech. Returns the quotient of this |
| public ComparableQuantity | divide(Number
the divisor)Number divisor.Implements tech. Returns the quotient of this |
| public Number | getValue()
Implements abstract tech. Implements javax. Returns the numeric value of the quantity. |
| public ComparableQuantity | inverse()
Implements tech. Returns a |
| public ComparableQuantity | multiply(Quantity<?>
the that)Quantity multiplicand.Implements tech. Returns the product of this |
| public ComparableQuantity | multiply(Number
the factor)Number multiplicand.Implements tech. Returns the product of this |
| public Quantity | negate()
Implements javax. Returns a |
| public ComparableQuantity | subtract(Quantity<Q>
the that)Quantity to be subtracted.Implements tech. Returns the difference between this |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| value | back to summary |
|---|---|
| private final Number value | |
| NumberQuantity | back to summary |
|---|---|
protected NumberQuantity(Number number, Unit<Q> unit, Quantity.
| |
| NumberQuantity | back to summary |
|---|---|
| protected NumberQuantity(Number number, Unit<Q> unit) | |
| add | back to summary |
|---|---|
| public ComparableQuantity Implements tech. Doc from javax. Returns the sum of this
| |
| divide | back to summary |
|---|---|
| public ComparableQuantity Implements tech. Doc from javax. Returns the quotient of this
| |
| divide | back to summary |
|---|---|
| public ComparableQuantity Implements tech. Doc from javax. Returns the quotient of this
| |
| getValue | back to summary |
|---|---|
| public Number getValue() Implements abstract tech. Implements javax. Doc from tech. Returns the numeric value of the quantity. | |
| inverse | back to summary |
|---|---|
| public ComparableQuantity Implements tech. Doc from javax. Returns a
| |
| multiply | back to summary |
|---|---|
| public ComparableQuantity Implements tech. Doc from javax. Returns the product of this
| |
| multiply | back to summary |
|---|---|
| public ComparableQuantity Implements tech. Doc from javax. Returns the product of this
| |
| negate | back to summary |
|---|---|
| public Quantity Implements javax. Doc from javax. Returns a | |
| subtract | back to summary |
|---|---|
| public ComparableQuantity Implements tech. Doc from javax. Returns the difference between this
| |