Package com.ntu.fdae.group1.bto.enums
Enum MaritalStatus
- All Implemented Interfaces:
Serializable
,Comparable<MaritalStatus>
,java.lang.constant.Constable
Defines the possible marital statuses for users in the BTO system.
Marital status is a key eligibility factor for BTO housing applications, as different flat types and schemes have different marital status requirements. This enum provides standardized values for tracking a user's marital status.
Each enum value stores a user-friendly display string that can be used in the UI.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionGets the user-friendly display string for this marital status.toString()
Returns the user-friendly display string for this marital status.static MaritalStatus
Returns the enum constant of this type with the specified name.static MaritalStatus[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
SINGLE
Represents a user who is not married. Single applicants may have restrictions on certain flat types or schemes. -
MARRIED
Represents a user who is legally married. Married applicants may qualify for additional schemes or flat types.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
getStatus
Gets the user-friendly display string for this marital status.- Returns:
- The display string representation of this status
-
toString
Returns the user-friendly display string for this marital status.- Overrides:
toString
in classEnum<MaritalStatus>
- Returns:
- The display string representation of this status
-