Enum Class IncomeCategory
- All Implemented Interfaces:
Serializable
,Comparable<IncomeCategory>
,Constable
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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionMonetary gifts.The monthly salary of the user.The monthly amount the user receives in student loan. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic IncomeCategory
Returns the enum constant of this class with the specified name.static IncomeCategory[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SALARY
The monthly salary of the user. -
STUDENT_LOAN
The monthly amount the user receives in student loan. -
GIFT
Monetary gifts.
-
-
Field Details
-
label
Label of the categories. The label formats the string value of the categories two string in lower caps.
-
-
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
-