Package br.com.intersys.systextil.util
Class Cnpj
java.lang.Object
br.com.intersys.systextil.util.Cnpj
- All Implemented Interfaces:
Comparable<Cnpj>
Deprecated, for removal: This API element is subject to removal in a future version.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal intDeprecated, for removal: This API element is subject to removal in a future version.final intDeprecated, for removal: This API element is subject to removal in a future version.final intDeprecated, for removal: This API element is subject to removal in a future version.static final TempConverter<Cnpj, Integer[]> Deprecated, for removal: This API element is subject to removal in a future version.Conversor usado nos cadastros de registros temporários para filtros em relatórios.static final CnpjDeprecated, for removal: This API element is subject to removal in a future version. -
Constructor Summary
ConstructorsConstructorDescriptionCnpj(int cgc9, int cgc4, int cgc2) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionfinal intDeprecated, for removal: This API element is subject to removal in a future version.Este método não pode ser sobrescrito, pois comparações de instâncias deste tipo devem ser compatíveis comCnpj.booleanDeprecated, for removal: This API element is subject to removal in a future version.format()Deprecated, for removal: This API element is subject to removal in a future version.Secgc4for zero, formata como CPF; caso contário, como CNPJ.Deprecated, for removal: This API element is subject to removal in a future version.Formata como um CNPJ: 50.464.734/0001-08Deprecated, for removal: This API element is subject to removal in a future version.Formata como um CPF: 751.280.989-74inthashCode()Deprecated, for removal: This API element is subject to removal in a future version.booleanDeprecated, for removal: This API element is subject to removal in a future version.static CnpjDeprecated, for removal: This API element is subject to removal in a future version.Obtém um Cnpj a partir de um CPF ou CNPJ.static CnpjDeprecated, for removal: This API element is subject to removal in a future version.Obtém um Cnpj a partir de um CNPJ formatado como CNPJ (por exemplo 12.345.678/0001-35) - com algumas tolerâncias.static CnpjDeprecated, for removal: This API element is subject to removal in a future version.Obtém um Cnpj a partir de um CPF formatado como CPF (por exemplo 123.456.789-35) - com algumas tolerâncias.toNew()Deprecated, for removal: This API element is subject to removal in a future version.Utilidade para obter um CNPJ alfanumérico.toString()Deprecated, for removal: This API element is subject to removal in a future version.
-
Field Details
-
TEMP_CONVERTER
Deprecated, for removal: This API element is subject to removal in a future version.Conversor usado nos cadastros de registros temporários para filtros em relatórios. -
ZEROS
Deprecated, for removal: This API element is subject to removal in a future version. -
cgc9
public final int cgc9Deprecated, for removal: This API element is subject to removal in a future version. -
cgc4
public final int cgc4Deprecated, for removal: This API element is subject to removal in a future version. -
cgc2
public final int cgc2Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Constructor Details
-
Cnpj
public Cnpj(int cgc9, int cgc4, int cgc2) Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
equals
Deprecated, for removal: This API element is subject to removal in a future version. -
isPessoaFisica
public boolean isPessoaFisica()Deprecated, for removal: This API element is subject to removal in a future version. -
hashCode
public int hashCode()Deprecated, for removal: This API element is subject to removal in a future version. -
toString
Deprecated, for removal: This API element is subject to removal in a future version. -
parseCNPJ
Deprecated, for removal: This API element is subject to removal in a future version.Obtém um Cnpj a partir de um CNPJ formatado como CNPJ (por exemplo 12.345.678/0001-35) - com algumas tolerâncias. Os pontos não são necessários, nem zeros à esquerda. Se não tiver delimitadores, deve conter 14 dígitos. Espaços ao redor são desconsiderados.- Returns:
- o Cnpj correspondente ao CNPJ, ou nulo se estiver nulo ou vazio
- Throws:
IllegalArgumentException- se não estiver em um formato válido
-
parseCPF
Deprecated, for removal: This API element is subject to removal in a future version.Obtém um Cnpj a partir de um CPF formatado como CPF (por exemplo 123.456.789-35) - com algumas tolerâncias. Os pontos não são necessários, nem zeros à esquerda, e o delimitador pode ser hífen ou barra. Se não tiver delimitadores, deve conter 11 dígitos. Espaços ao redor são desconsiderados.- Returns:
- o Cnpj correspondente ao CNPJ, ou nulo se estiver nulo ou vazio
- Throws:
IllegalArgumentException- se não estiver em um formato válido
-
parse
Deprecated, for removal: This API element is subject to removal in a future version.Obtém um Cnpj a partir de um CPF ou CNPJ. Primeiro tentaparseCNPJ(java.lang.String), e, se não funcionar, tentaparseCPF(java.lang.String).- Returns:
- o Cnpj correspondente, ou nulo se estiver nulo ou vazio
- Throws:
IllegalArgumentException- se não estiver em um formato válido
-
formatCNPJ
Deprecated, for removal: This API element is subject to removal in a future version.Formata como um CNPJ: 50.464.734/0001-08 -
formatCPF
Deprecated, for removal: This API element is subject to removal in a future version.Formata como um CPF: 751.280.989-74 -
format
Deprecated, for removal: This API element is subject to removal in a future version.Secgc4for zero, formata como CPF; caso contário, como CNPJ. -
compareTo
Deprecated, for removal: This API element is subject to removal in a future version.Este método não pode ser sobrescrito, pois comparações de instâncias deste tipo devem ser compatíveis comCnpj.- Specified by:
compareToin interfaceComparable<Cnpj>
-
toNew
Deprecated, for removal: This API element is subject to removal in a future version.Utilidade para obter um CNPJ alfanumérico.- Returns:
- o CNPJ alfanumérico correspondente a este CNPJ
-
CNPJ.