Enum UnitStyle

    • Enum Constant Detail

      • NAME

        public static final UnitStyle NAME
        The unit will be rendered as its name.
        See Also:
        Unit.getName()
      • SYMBOL

        public static final UnitStyle SYMBOL
        The unit will be rendered as its symbol.
        See Also:
        Unit.getSymbol()
      • LABEL

        public static final UnitStyle LABEL
        The unit will be rendered as its label.
        See Also:
        javax.measure.format.UnitFormat#label()
      • NAME_AND_SYMBOL

        public static final UnitStyle NAME_AND_SYMBOL
        The unit will be rendered as its name and symbol.
        See Also:
        Unit.getName(), Unit.getSymbol()
      • SYMBOL_AND_LABEL

        public static final UnitStyle SYMBOL_AND_LABEL
        The unit will be rendered as its symbol and also labeled.
        See Also:
        Unit.getSymbol(), javax.measure.format.UnitFormat#label()
    • Method Detail

      • values

        public static UnitStyle[] values()
        Returns an array containing the constants of this enum type, in the order they are declared.
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static UnitStyle valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null