Q - Comparable<javax.measure.Unit<Q>>, Serializable, javax.measure.Unit<Q>AbstractUnit, AlternateUnit, AnnotatedUnit, BaseUnit, ProductUnit, TransformedUnitpublic interface ComparableUnit<Q extends javax.measure.Quantity<Q>> extends javax.measure.Unit<Q>, Comparable<javax.measure.Unit<Q>>, Serializable
| Modifier and Type | Method | Description |
|---|---|---|
javax.measure.UnitConverter |
getSystemConverter() |
Returns the converter from this unit to its unscaled
System Unit unit. |
javax.measure.Unit<Q> |
getSystemUnit() |
Returns the system unit (unscaled SI unit) from which this unit is derived.
|
boolean |
isEquivalentTo(javax.measure.Unit<Q> that) |
Compares two instances of
Unit<Q>, doing the conversion of unit if necessary. |
boolean |
isSystemUnit() |
Indicates if this unit belongs to the set of coherent SI units (unscaled SI
units).
|
compareToboolean isEquivalentTo(javax.measure.Unit<Q> that)
Unit<Q>, doing the conversion of unit if necessary.that - the Unit<Q> to be compared with this instance.true if that < this.NullPointerException - if the unit is nullboolean isSystemUnit()
equals(toSystemUnit())javax.measure.Unit<Q> getSystemUnit()
static boolean isAngularVelocity(AbstractUnit> unit) {
return unit.getSystemUnit().equals(RADIAN.divide(SECOND));
}
assert(REVOLUTION.divide(MINUTE).isAngularVelocity()); // Returns true. javax.measure.UnitConverter getSystemConverter()
System Unit unit.getConverterTo(this.toSystemUnit())#toSystemUnitCopyright © 2005–2020 Units of Measurement project. All rights reserved.