Interface UnitFormatService


  • public interface UnitFormatService
    This interface represent the service to obtain UnitFormat instances.
    Since:
    1.0
    Version:
    1.0, August 8, 2016
    • 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 on Locale.current() while others may return getUnitFormat("Simple") or getUnitFormat("ISO")
        Returns:
        the default UnitFormat implementation.
      • getUnitFormat

        UnitFormat getUnitFormat​(java.lang.String name)
        Returns the unit format having the specified name or null if none. For example getUnitFormat("UCUM") to return a UCUM specific UnitFormat implementation.
        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.