TimeUnit in Unit-API
| Modifier and Type | Field and Description |
|---|---|
| private static final long | |
| private final TimeUnit | |
| private final Number |
| Access | Constructor and Description |
|---|---|
| pack-priv | TimeUnitQuantity(TimeUnit
- time to be used timeUnit, Number - value to be used value)creates the |
| Modifier and Type | Method and Description |
|---|---|
| public ComparableQuantity | add(Quantity<Time>
the that)Quantity to be added.Implements tech. Returns the sum of this |
| private ComparableQuantity | |
| private ComparableQuantity | applyMultiplicativeQuantityOperation(Quantity<?> that, BinaryOperator<Number> valueOperator, BinaryOperator<Unit<?>> unitOperator)
|
| private static <R extends Quantity | |
| public ComparableQuantity | divide(Quantity<?>
the that)Quantity divisor.Implements tech. Returns the quotient of this |
| public ComparableQuantity | divide(Number
the that)Number divisor.Implements tech. Returns the quotient of this |
| public boolean | equals(Object
the object to compare with. obj)Overrides tech. Compares this quantity against the specified object for strict equality (same unit and same amount). |
| public TimeUnit | |
| public Number | Returns: the valueImplements abstract tech. Implements javax. get value expressed in |
| public int | hashCode()
Overrides tech. Returns the hash code for this 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 that)Number multiplicand.Implements tech. Returns the product of this |
| public Quantity | negate()
Implements javax. Returns a |
| public static TimeUnitQuantity | |
| public static TimeUnitQuantity | Returns: theTimeUnitQuantity converted be quantity in seconds.- quantity to be used quantity)Creates a |
| private static <R extends Quantity | |
| public ComparableQuantity | subtract(Quantity<Time>
the that)Quantity to be subtracted.Implements tech. Returns the difference between this |
| public TimeUnitQuantity | |
| public Quantity | Returns: this class converted to QuantityConverts the |
| public String | toString()
Overrides tech. Returns the |
| public Unit | |
| private static Unit |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| timeUnit | back to summary |
|---|---|
| private final TimeUnit timeUnit | |
| value | back to summary |
|---|---|
| private final Number value | |
| TimeUnitQuantity | back to summary |
|---|---|
| pack-priv TimeUnitQuantity(TimeUnit timeUnit, Number value) creates the | |
| add | back to summary |
|---|---|
| public ComparableQuantity Implements tech. Doc from javax. Returns the sum of this
| |
| applyMultiplicativeNumberOperation | back to summary |
|---|---|
| private ComparableQuantity | |
| applyMultiplicativeQuantityOperation | back to summary |
|---|---|
| private ComparableQuantity | |
| convertedQuantityValue | back to summary |
|---|---|
| private static <R extends Quantity | |
| 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
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides tech. Doc from tech. Compares this quantity against the specified object for strict equality (same unit and same amount).
Similarly to the
To compare quantities stated using different units or using different amount implementations the | |
| getTimeUnit | back to summary |
|---|---|
| public TimeUnit getTimeUnit() get to
| |
| getValue | back to summary |
|---|---|
| public Number getValue() Implements abstract tech. Implements javax. get value expressed in
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides tech. Doc from tech. Returns the hash code for this 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 | |
| of | back to summary |
|---|---|
| public static TimeUnitQuantity of(Number number, TimeUnit timeUnit) creates the
| |
| of | back to summary |
|---|---|
| public static TimeUnitQuantity of(Quantity<Time> quantity) Creates a
| |
| quantityValue | back to summary |
|---|---|
| private static <R extends Quantity | |
| subtract | back to summary |
|---|---|
| public ComparableQuantity Implements tech. Doc from javax. Returns the difference between this
| |
| to | back to summary |
|---|---|
| public TimeUnitQuantity to(TimeUnit aTimeUnit) | |
| toQuantity | back to summary |
|---|---|
| public Quantity Converts the | |
| toString | back to summary |
|---|---|
| public String toString() Overrides tech. Doc from tech. Returns the | |
| toUnit | back to summary |
|---|---|
public Unit
| |
| toUnit | back to summary |
|---|---|
| private static Unit | |