Enum Class CNPJ.Format
- All Implemented Interfaces:
Serializable, Comparable<CNPJ.Format>, Constable
- Enclosing class:
CNPJ
- Author:
- George Gastaldi
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe new CNPJ format that is constructed from digits and ASCII letters, e.g.The older, original, CNPJ format that is constructed from digits only, e.g. -
Method Summary
Modifier and TypeMethodDescriptionstatic CNPJ.FormatReturns the enum constant of this class with the specified name.static CNPJ.Format[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NUMERIC
The older, original, CNPJ format that is constructed from digits only, e.g.dd.ddd.ddd/dddd-dd, wheredrepresents a digit. -
ALPHANUMERIC
The new CNPJ format that is constructed from digits and ASCII letters, e.g.ss.sss.sss/ssss-dd, wheredrepresents a digit andsrepresents either a digit or a letter. This format adoption should start in January 2026.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-