Interface ComparableUnit<Q extends javax.measure.Quantity<Q>>

    • Method Summary

      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).
      • Methods inherited from interface javax.measure.Unit

        alternate, asType, divide, divide, divide, getBaseUnits, getConverterTo, getConverterToAny, getDimension, getName, getSymbol, inverse, isCompatible, multiply, multiply, multiply, pow, prefix, root, shift, shift, toString, transform
    • Method Detail

      • isSystemUnit

        boolean isSystemUnit()
        Indicates if this unit belongs to the set of coherent SI units (unscaled SI units). The base and coherent derived units of the SI form a coherent set, designated the set of coherent SI units. The word coherent is used here in the following sense: when coherent units are used, equations between the numerical values of quantities take exactly the same form as the equations between the quantities themselves. Thus if only units from a coherent set are used, conversion factors between units are never required.
        Returns:
        equals(toSystemUnit())
      • getSystemUnit

        javax.measure.Unit<Q> getSystemUnit()
        Returns the system unit (unscaled SI unit) from which this unit is derived. They can be be used to identify a quantity given the unit. For example:
        static boolean isAngularVelocity(AbstractUnit unit) {
          return unit.getSystemUnit().equals(RADIAN.divide(SECOND));
        }
        assert(REVOLUTION.divide(MINUTE).isAngularVelocity()); // Returns true.
        Specified by:
        getSystemUnit in interface javax.measure.Unit<Q extends javax.measure.Quantity<Q>>
        Returns:
        the unscaled metric unit from which this unit is derived.
      • getSystemConverter

        javax.measure.UnitConverter getSystemConverter()
        Returns the converter from this unit to its unscaled System Unit unit.
        Returns:
        getConverterTo(this.toSystemUnit())
        See Also:
        #toSystemUnit