Enum Class UIDataName
- All Implemented Interfaces:
Serializable, Comparable<UIDataName>, Constable
Enum for UI data names, to avoid hardcoding strings throughout the codebase and reduce risk of typos.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionUI data name for the selected category filter.UI data name for the maximum price filter.UI data name for the minimum price filter.UI data name for the minimum star rating filter.UI data name for the search query input.UI data name for the sorting option. -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateUIDataName(String value) Constructor aUIDataNameenum constant with the specified string value. -
Method Summary
Modifier and TypeMethodDescriptiongetValue()Getter for the string value associated with this enum constant.static UIDataNameReturns the enum constant of this class with the specified name.static UIDataName[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
MIN_PRICE
UI data name for the minimum price filter. -
MAX_PRICE
UI data name for the maximum price filter. -
SEARCH_QUERY
UI data name for the search query input. -
FILTERS_CONTAINER
UI data name for the selected category filter. -
MIN_STAR_RATING
UI data name for the minimum star rating filter. -
SORTING_OPTION
UI data name for the sorting option.
-
-
Field Details
-
value
The string value associated with this enum constant, used for UI data keys.
-
-
Constructor Details
-
UIDataName
Constructor aUIDataNameenum constant with the specified string value.- Parameters:
value- The string value to associate with this enum constant.
-
-
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
-
getValue
Getter for the string value associated with this enum constant.- Returns:
- The string value that can be used as a key in UI data storage.
-