Enum MaritalStatus

java.lang.Object
java.lang.Enum<MaritalStatus>
com.ntu.fdae.group1.bto.enums.MaritalStatus
All Implemented Interfaces:
Serializable, Comparable<MaritalStatus>, java.lang.constant.Constable

public enum MaritalStatus extends Enum<MaritalStatus>
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.

  • Enum Constant Details

    • SINGLE

      public static final MaritalStatus SINGLE
      Represents a user who is not married. Single applicants may have restrictions on certain flat types or schemes.
    • MARRIED

      public static final MaritalStatus MARRIED
      Represents a user who is legally married. Married applicants may qualify for additional schemes or flat types.
  • Method Details

    • values

      public static MaritalStatus[] 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

      public static MaritalStatus valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getStatus

      public String getStatus()
      Gets the user-friendly display string for this marital status.
      Returns:
      The display string representation of this status
    • toString

      public String toString()
      Returns the user-friendly display string for this marital status.
      Overrides:
      toString in class Enum<MaritalStatus>
      Returns:
      The display string representation of this status