Enum Class IncomeCategory

java.lang.Object
java.lang.Enum<IncomeCategory>
no.ntnu.idatt1002.demo.data.economics.IncomeCategory
All Implemented Interfaces:
Serializable, Comparable<IncomeCategory>, Constable

public enum IncomeCategory extends Enum<IncomeCategory>
This class represents various types of income that a user can choose from. While not covering every kind of income they give a good range to work with.
Since:
05.03.2023.
Author:
HanneSofie
  • Enum Constant Details

    • SALARY

      public static final IncomeCategory SALARY
      The monthly salary of the user.
    • STUDENT_LOAN

      public static final IncomeCategory STUDENT_LOAN
      The monthly amount the user receives in student loan.
    • GIFT

      public static final IncomeCategory GIFT
      Monetary gifts.
  • Field Details

    • label

      public final String label
      Label of the categories. The label formats the string value of the categories two string in lower caps.
  • Method Details

    • values

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

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