Package javax.measure.spi
Interface UnitFormatService
-
public interface UnitFormatServiceThis interface represent the service to obtainUnitFormatinstances.- Since:
- 1.0
- Version:
- 1.0, August 8, 2016
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Set<java.lang.String>getAvailableFormatNames()Gets a list with available format names for this format service.UnitFormatgetUnitFormat()Returns the default unit format.UnitFormatgetUnitFormat(java.lang.String name)Returns the unit format having the specified name ornullif none.
-
-
-
Method Detail
-
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
UnitFormatimplementation.
-
getUnitFormat
UnitFormat getUnitFormat(java.lang.String name)
Returns the unit format having the specified name ornullif none. For examplegetUnitFormat("UCUM")to return a UCUM specificUnitFormatimplementation.- Parameters:
name- the name of the format.- Returns:
- the corresponding unit format.
-
getAvailableFormatNames
java.util.Set<java.lang.String> getAvailableFormatNames()
Gets a list with available format names for this format service.- Returns:
- list of available formats, never null.
-
-