Interface SystemOfUnits


public interface SystemOfUnits
A system of units grouped together for historical or cultural reasons.
Common system of units are "SI" (System International), "Imperial" (British), "US" (US Customary). Nothing prevents a unit from belonging to several systems of units at the same time (for example an Imperial system would have many of the units held by the US Customary system).
Since:
1.0
Version:
1.1, June 21, 2018
Author:
Jean-Marie Dautelle, Werner Keil
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
     
    <Q extends Quantity<Q>>
    Unit<Q>
    getUnit(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(String string)
    Returns a unit with the given string representation or null if none is found in this unit system.
    Set<? extends Unit<?>>
    Returns a read only view over the units explicitly defined by this system.
    Set<? extends Unit<?>>
    getUnits(Dimension dimension)
    Returns the units defined in this system having the specified dimension (convenience method).
  • Method Details

    • getName

      Returns:
      a name
    • getUnit

      <Q extends Quantity<Q>> Unit<Q> getUnit(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(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

      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

      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.