Enum Class NumberFormatStyle

java.lang.Object
java.lang.Enum<NumberFormatStyle>
org.praxisplatform.uischema.numeric.NumberFormatStyle
All Implemented Interfaces:
Serializable, Comparable<NumberFormatStyle>, Constable

public enum NumberFormatStyle extends Enum<NumberFormatStyle>
Enum que define os estilos de formatação numérica para campos. Estes estilos determinam como os valores numéricos devem ser apresentados na interface do usuário.
  • Enum Constant Details

    • CURRENCY

      public static final NumberFormatStyle CURRENCY
      Formato de moeda. Exemplo: Exibe o valor como "$1,234.56".
    • DECIMAL

      public static final NumberFormatStyle DECIMAL
      Formato decimal padrão. Exemplo: Exibe o valor como "1234.56".
    • PERCENT

      public static final NumberFormatStyle PERCENT
      Formato de percentual. Exemplo: Exibe o valor como "12.34%". (Multiplica por 100 e adiciona o símbolo '%')
    • SCIENTIFIC

      public static final NumberFormatStyle SCIENTIFIC
      Formato científico (notação exponencial). Exemplo: Exibe o valor como "1.23456E3".
    • NONE

      public static final NumberFormatStyle NONE
      Sem formatação especial. Exemplo: Exibe o valor como está, sem separadores, símbolos ou formatação especial.
  • Method Details

    • values

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

      public static NumberFormatStyle valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public String getValue()
      Obtém o valor string do estilo de formato numérico. Este valor é usado para identificar o estilo de formato em configurações ou APIs.
      Returns:
      O valor string do estilo de formato.
    • fromValue

      public static NumberFormatStyle fromValue(String value)
      Converte um valor string para o Enum NumberFormatStyle correspondente. A comparação é feita de forma case-insensitive.
      Parameters:
      value - O valor string a ser convertido (ex: "currency", "decimal").
      Returns:
      O Enum NumberFormatStyle correspondente.
      Throws:
      IllegalArgumentException - se o valor string não corresponder a nenhum estilo de formato conhecido.