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

  • Type Parameters:
    Q -
    All Superinterfaces:
    java.lang.Comparable<javax.measure.Unit<Q>>, java.io.Serializable, javax.measure.Unit<Q>
    All Known Implementing Classes:
    AbstractUnit, AlternateUnit, AnnotatedUnit, BaseUnit, ProductUnit, TransformedUnit

    public interface ComparableUnit<Q extends javax.measure.Quantity<Q>>
    extends javax.measure.Unit<Q>, java.lang.Comparable<javax.measure.Unit<Q>>, java.io.Serializable
    Unit specialized for the Java SE platform. It extends Unit with Comparable and Serializable
    Since:
    1.0.9
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean isEquivalentOf​(javax.measure.Unit<Q> that)
      Compares two instances of , 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 java.lang.Comparable

        compareTo
      • Methods inherited from interface javax.measure.Unit

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

      • isEquivalentOf

        boolean isEquivalentOf​(javax.measure.Unit<Q> that)
        Compares two instances of , doing the conversion of unit if necessary.
        Parameters:
        that - the Unit<Q> to be compared with this instance.
        Returns:
        true if that < this.
        Throws:
        java.lang.NullPointerException - if the unit is null
      • 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())