Enum Class RegistrationStatus
- All Implemented Interfaces:
Serializable,Comparable<RegistrationStatus>,Constable
Represents the status of an Officer's registration request for a specific housing project.
Defines the possible states during the registration approval process.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe officer's registration request has been approved by a manager; the officer is assigned to the project.The officer has submitted a request to register for the project, and it is awaiting review by a manager.The officer's registration request has been rejected by a manager. -
Method Summary
Modifier and TypeMethodDescriptionReturns a string representation of the status, formatted with ANSI escape codes for colored console output.static RegistrationStatusReturns the enum constant of this class with the specified name.static RegistrationStatus[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PENDING
The officer has submitted a request to register for the project, and it is awaiting review by a manager. -
APPROVED
The officer's registration request has been approved by a manager; the officer is assigned to the project. -
REJECTED
The officer's registration request has been rejected by a manager.
-
-
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
-
coloredString
Returns a string representation of the status, formatted with ANSI escape codes for colored console output.- PENDING: Yellow
- APPROVED: Green
- REJECTED: Red
- Returns:
- A colorized string representation of the enum constant name.
-