Enum CNPJ.Format

java.lang.Object
java.lang.Enum<CNPJ.Format>
org.hibernate.validator.constraints.br.CNPJ.Format
All Implemented Interfaces:
Serializable, Comparable<CNPJ.Format>
Enclosing class:
CNPJ

public static enum CNPJ.Format extends Enum<CNPJ.Format>
  • Enum Constant Details

    • NUMERIC

      public static final CNPJ.Format NUMERIC
      The older, original, CNPJ format that is constructed from digits only, e.g. dd.ddd.ddd/dddd-dd, where d represents a digit.
    • ALPHANUMERIC

      public static final CNPJ.Format ALPHANUMERIC
      The new CNPJ format that is constructed from digits and ASCII letters, e.g. ss.sss.sss/ssss-dd, where d represents a digit and s represents either a digit or a letter. This format adoption should start in January 2026.
  • Method Details

    • values

      public static CNPJ.Format[] 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 CNPJ.Format 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