Package javax.measure.spi
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
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 TypeMethodDescriptiongetName()
Returns the default unit for the specified quantity ornull
if none is defined for the given quantity in this unit system.Unit<?>
Returns a unit with the given string representation ornull
if none is found in this unit system.getUnits()
Returns a read only view over the units explicitly defined by this system.Returns the units defined in this system having the specified dimension (convenience method).
-
Method Details
-
getName
- Returns:
- a name
-
getUnit
Returns the default unit for the specified quantity ornull
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
Returns a unit with the given string representation ornull
if none is found in this unit system.- Parameters:
string
- the string representation of a unit, notnull
.- Returns:
- the unit with the given string representation.
- Since:
- 2.0
-
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
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.
-