Method Summary |
|
public Amount<Q> | abs() Returns the absolute value of this measure. |
public boolean | approximates(Amount that) Indicates if this measure approximates that measure.
Measures are considered approximately equals if their value intervals
overlaps. |
public int | compareTo(Measurable<Q> that) Compares this measure with the specified measurable object.
Parameters: that - the measure to compare with. |
public Amount<Q> | copy() |
public Amount<Q> | divide(long divisor) Returns this measure divided by the specified exact divisor
(dimensionless).
Parameters: divisor - the exact divisor. |
public Amount<Q> | divide(double divisor) Returns this measure divided by the specified approximate divisor
(dimensionless).
Parameters: divisor - the approximated divisor. |
public Amount<? extends Quantity> | divide(Amount that) Returns this measure divided by the one specified.
Parameters: that - the measure divisor. |
public double | doubleValue(Unit<Q> unit) |
public boolean | equals(Object that) Compares this measure against the specified object for strict
equality (same value interval and same units).
Parameters: that - the object to compare with. |
public double | getAbsoluteError() Returns the value by which the
Amount.getEstimatedValue() estimated value may differ from the true value (all stated in base units). |
public double | getEstimatedValue() Returns the estimated value for this measure stated in this measure
Amount.getUnit unit . |
public long | getExactValue() Returns the exact value for this measure stated in this measure
Amount.getUnit unit . |
public double | getMaximumValue() Returns the upper bound interval value for this measure stated in
this measure unit. |
public double | getMinimumValue() Returns the lower bound interval value for this measure stated in
this measure unit. |
public double | getRelativeError() Returns the percentage by which the estimated amount may differ
from the true amount. |
public Unit<Q> | getUnit() Returns the unit in which the
Amount.getEstimatedValue()estimated value and
Amount.getAbsoluteError() absolute error are stated. |
public int | hashCode() Returns the hash code for this measure. |
public Amount<? extends Quantity> | inverse() Returns the multiplicative inverse of this measure. |
public boolean | isExact() Indicates if this measure amount is exact. |
public boolean | isGreaterThan(Amount<Q> that) Indicates if this measure is ordered after that measure
(independently of the measure unit). |
public boolean | isLargerThan(Amount<Q> that) Compares this measure with that measure ignoring the sign. |
public boolean | isLessThan(Amount<Q> that) Indicates if this measure is ordered before that measure
(independently of the measure unit). |
final public long | longValue(Unit<Q> unit) |
public Amount<Q> | minus(Amount that) Returns the difference of this measure with the one specified.
Parameters: that - the measure to be subtracted. |
public Amount<Q> | opposite() Returns the opposite of this measure. |
public Amount<Q> | plus(Amount that) Returns the sum of this measure with the one specified.
Parameters: that - the measure to be added. |
public Amount<? extends Quantity> | pow(int exp) Returns this measure raised at the specified exponent.
Parameters: exp - the exponent. |
public static Amount<Q> | rangeOf(double minimum, double maximum, Unit<Q> unit) Returns the measure corresponding to the specified interval stated
in the specified unit.
Parameters: minimum - the lower bound for the measure value. Parameters: maximum - the upper bound for the measure value. Parameters: unit - the unit for both the minimum and maximum values. |
public Amount<? extends Quantity> | root(int n) Returns the given root of this measure.
Parameters: n - the root's order (n != 0). |
public Amount<? extends Quantity> | sqrt() Returns the square root of this measure. |
public Amount<Q> | times(long factor) Returns this measure scaled by the specified exact factor
(dimensionless).
Parameters: factor - the scaling factor. |
public Amount<Q> | times(double factor) Returns this measure scaled by the specified approximate factor
(dimensionless).
Parameters: factor - the scaling factor. |
public Amount<? extends Quantity> | times(Amount that) Returns the product of this measure with the one specified.
Parameters: that - the measure multiplier. |
public Amount<R> | to(Unit<R> unit) Returns the measure equivalent to this measure but stated in the
specified unit. |
final public String | toString() Returns the text representation of this amount as a
java.lang.String . |
public Text | toText() Returns the text representation of this measure. |
public static Amount<Q> | valueOf(long value, Unit<Q> unit) Returns the exact measure corresponding to the value stated in the
specified unit.
Parameters: value - the exact value stated in the specified unit. Parameters: unit - the unit in which the value is stated. |
public static Amount<Q> | valueOf(double value, Unit<Q> unit) Returns the measure corresponding to an approximate value
(double ) stated in the specified unit;
the precision of the measure is assumed to be the
double precision (64 bits IEEE 754 format).
Parameters: value - the estimated value (± LSB) stated in the specified unit. Parameters: unit - the unit in which the value is stated. |
public static Amount<Q> | valueOf(double value, double error, Unit<Q> unit) Returns the measure corresponding to the specified approximate value
and measurement error, both stated in the specified unit.
Parameters: value - the estimated amount (± error) stated in the specified unit. Parameters: error - the measurement error (absolute). Parameters: unit - the unit in which the amount and the error are stated. |
public static Amount> | valueOf(CharSequence csq) Returns the measure represented by the specified character sequence.
Parameters: csq - the character sequence. |