Package main.model.project
Enum Class ProjectStatus
- All Implemented Interfaces:
Serializable
,Comparable<ProjectStatus>
,Constable
This enum represents the status of a project
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe project is allocated to a studentThe project is available for allocationThe project is reserved for a studentThe project is unavailable for allocation -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the status of the project in a colorful stringstatic ProjectStatus
Returns the enum constant of this class with the specified name.static ProjectStatus[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
AVAILABLE
The project is available for allocation -
RESERVED
The project is reserved for a student -
UNAVAILABLE
The project is unavailable for allocation -
ALLOCATED
The project is allocated to a student
-
-
Constructor Details
-
ProjectStatus
private ProjectStatus()
-
-
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
-
showColorfulString
Get the status of the project in a colorful string- Returns:
- the status of the project in a colorful string
-