Top Description Methods
javax.measure.spi

public Interface SystemOfUnits

Imports
java.util.Set, javax.measure.Dimension, .Quantity, .Unit

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).
Authors
Jean-Marie Dautelle, Werner Keil
Since
1.0
Version
1.1, June 21, 2018
See Also
Wikipedia: International System of Units, Wikipedia: System of measurement

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

a name
getName
()

public <
the compile-time quantity type.
Q extends Quantity<Q>
>
Unit<Q>

Returns:

the unit for the specified quantity.
getUnit
(Class<Q>
the quantity type.
quantityType
)

Returns the default unit for the specified quantity or null if none is defined for the given quantity in this unit system.

public Unit<?>

Returns:

the unit with the given string representation.
getUnit
(String
the string representation of a unit, not null.
string
)

Returns a unit with the given string representation or null if none is found in this unit system.

public Set<? extends Unit<?>>

Returns:

the defined collection of units.
getUnits
()

Returns a read only view over the units explicitly defined by this system.

public Set<? extends Unit<?>>

Returns:

the collection of units of specified dimension.
getUnits
(Dimension
the dimension of the units to be returned.
dimension
)

Returns the units defined in this system having the specified dimension (convenience method).

Method Detail

getNameback to summary
public String getName()
Returns:String

a name

getUnitback to summary
public <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.

Parameters
<Q>
the compile-time quantity type.
quantityType:Class<Q>

the quantity type.

Returns:Unit<Q>

the unit for the specified quantity.

getUnitback to summary
public Unit<?> getUnit(String string)

Returns a unit with the given string representation or null if none is found in this unit system.

Parameters
string:String

the string representation of a unit, not null.

Returns:Unit<?>

the unit with the given string representation.

Since
2.0
getUnitsback to summary
public 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:Set<? extends Unit<?>>

the defined collection of units.

getUnitsback to summary
public Set<? extends Unit<?>> getUnits(Dimension dimension)

Returns the units defined in this system having the specified dimension (convenience method).

Parameters
dimension:Dimension

the dimension of the units to be returned.

Returns:Set<? extends Unit<?>>

the collection of units of specified dimension.