Interface SystemOfUnits

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String getName()  
      <Q extends Quantity<Q>>
      Unit<Q>
      getUnit​(java.lang.Class<Q> quantityType)
      Returns the default unit for the specified quantity or null if none is defined for the given quantity in this unit system.
      Unit<?> getUnit​(java.lang.String string)
      Returns a unit with the given string representation or null if none is found in this unit system.
      java.util.Set<? extends Unit<?>> getUnits()
      Returns a read only view over the units explicitly defined by this system.
      java.util.Set<? extends Unit<?>> getUnits​(Dimension dimension)
      Returns the units defined in this system having the specified dimension (convenience method).
    • Method Detail

      • getName

        java.lang.String getName()
        Returns:
        a name
      • getUnit

        <Q extends Quantity<Q>> Unit<Q> getUnit​(java.lang.Class<Q> quantityType)
        Returns the default unit for the specified quantity or null if none is defined for the given quantity in this unit system.
        Type Parameters:
        Q - the compile-time quantity type.
        Parameters:
        quantityType - the quantity type.
        Returns:
        the unit for the specified quantity.
      • getUnit

        Unit<?> getUnit​(java.lang.String string)
        Returns a unit with the given string representation or null if none is found in this unit system.
        Parameters:
        string - the string representation of a unit, not null.
        Returns:
        the unit with the given string representation.
        Since:
        2.0
      • getUnits

        java.util.Set<? extends Unit<?>> getUnits()
        Returns a read only view over the units explicitly defined by this system. This include the base and derived units which are assigned a special name and symbol. This set does not include new units created by arithmetic or other operations.
        Returns:
        the defined collection of units.
      • getUnits

        java.util.Set<? extends Unit<?>> getUnits​(Dimension dimension)
        Returns the units defined in this system having the specified dimension (convenience method).
        Parameters:
        dimension - the dimension of the units to be returned.
        Returns:
        the collection of units of specified dimension.