Enum Class StatusAdocao
- All Implemented Interfaces:
Serializable
,Comparable<StatusAdocao>
,Constable
Enum que representa o status de adoção do pet na tabela animais.
- Author:
- Edielson Assis
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionRetorna o status: ADOTADORetorna o status: DISPONIVELRetorna o status: PROCESSO_ADOCAO -
Method Summary
Modifier and TypeMethodDescriptionint
getCode()
Retorna o código associado ao status.static StatusAdocao
valueOf
(int code) Retorna o status de adoção de acordo o código informado.static StatusAdocao
Returns the enum constant of this class with the specified name.static StatusAdocao[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DISPONIVEL
Retorna o status: DISPONIVEL -
PROCESSO_ADOCAO
Retorna o status: PROCESSO_ADOCAO -
ADOTADO
Retorna o status: ADOTADO
-
-
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
-
getCode
public int getCode()Retorna o código associado ao status.- Returns:
- número do código.
-
valueOf
Retorna o status de adoção de acordo o código informado.- Parameters:
code
- código associado ao status.- Returns:
- StatusAdocao
- Throws:
IllegalArgumentException
- é lançada caso o código for inválido.
-