com.holonplatform.core.i18n

## Enum NumberFormatFeature

- java.lang.Object
- - java.lang.Enum<NumberFormatFeature>
  - - com.holonplatform.core.i18n.NumberFormatFeature

- All Implemented Interfaces:
    Serializable, Comparable<NumberFormatFeature>

      public enum NumberFormatFeature
      extends Enum<NumberFormatFeature>

  Enumeration of features which can be used to configure number format behaviour.
  Since:
    5.0.0
  See Also:
    `LocalizationContext`

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `DISABLE_GROUPING` Disable grouping (don't add grouping character in number format)
    `HIDE_DECIMALS_WHEN_ALL_ZERO` Hide number decimals when all decimal positions (if any) are equal to zero
    `PERCENT_STYLE` Use percent-style format.

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `hasFeature(NumberFormatFeature feature, NumberFormatFeature[] features)` Check if given `feature` is present among given `features` array
    `static NumberFormatFeature` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static NumberFormatFeature[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class java.lang.Enum

      `compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### DISABLE_GROUPING

          public static final NumberFormatFeature DISABLE_GROUPING

      Disable grouping (don't add grouping character in number format)

    - #### PERCENT_STYLE

          public static final NumberFormatFeature PERCENT_STYLE

      Use percent-style format. Given numbers are expected to be in decimal `0.xx` form

    - #### HIDE_DECIMALS_WHEN_ALL_ZERO

          public static final NumberFormatFeature HIDE_DECIMALS_WHEN_ALL_ZERO

      Hide number decimals when all decimal positions (if any) are equal to zero

  - ### Method Detail

    - #### values

          public static NumberFormatFeature[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (NumberFormatFeature c : NumberFormatFeature.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static NumberFormatFeature 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

    - #### hasFeature

          public static boolean hasFeature(NumberFormatFeature feature,
                                           NumberFormatFeature[] features)

      Check if given `feature` is present among given `features` array
      Parameters:
        `feature` - Feature to check
        `features` - Features set
      Returns:
        `true` if given `feature` is present in features set

Copyright © 2019 The Holon Platform. All rights reserved.