Package javax.measure.spi
Interface UnitFormatService
public interface UnitFormatService
This interface represent the service to obtain
UnitFormat
instances.- Since:
- 1.0
- Version:
- 1.0, August 8, 2016
-
Method Summary
Modifier and TypeMethodDescriptionGets a list with available format names for this format service.Returns the default unit format.getUnitFormat
(String name) Returns the unit format having the specified name ornull
if none.
-
Method Details
-
getUnitFormat
UnitFormat getUnitFormat()Returns the default unit format. It is up to implementations what to consider a suitable default. For some (locale-sensitive) implementations it may be a unit format based onLocale.current()
while others may returngetUnitFormat("Simple")
orgetUnitFormat("ISO")
- Returns:
- the default
UnitFormat
implementation.
-
getUnitFormat
Returns the unit format having the specified name ornull
if none. For examplegetUnitFormat("UCUM")
to return a UCUM specificUnitFormat
implementation.- Parameters:
name
- the name of the format.- Returns:
- the corresponding unit format.
-
getAvailableFormatNames
Gets a list with available format names for this format service.- Returns:
- list of available formats, never null.
-