Enum Class UIElementName
- All Implemented Interfaces:
Serializable, Comparable<UIElementName>, Constable
Enum for UI element 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 element name for the container holding all filters.UI element name for the maximum price slider filter.UI element name for the minimum price slider filter.UI element name for the recently viewed window.UI element name for the search query input field.UI element name for the container holding the pagination controls for searched items.UI element name for the container holding similar items.UI element name for the sorting option dropdown.UI element name for the star rating filter. -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateUIElementName(String value) Constructs aUIElementNameenum constant with the specified string value. -
Method Summary
Modifier and TypeMethodDescriptiongetValue()Getter for the string value associated with this enum constant.static UIElementNameReturns the enum constant of this class with the specified name.static UIElementName[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FILTERS_CONTAINER
UI element name for the container holding all filters. -
SEARCHED_ITEM_PAGINATION
UI element name for the container holding the pagination controls for searched items. -
MIN_PRICE_SLIDER
UI element name for the minimum price slider filter. -
MAX_PRICE_SLIDER
UI element name for the maximum price slider filter. -
SEARCH_FIELD
UI element name for the search query input field. -
STAR_RATING_FILTER
UI element name for the star rating filter. -
SORTING_OPTION_DROPDOWN
UI element name for the sorting option dropdown. -
RECENTLY_VIEWED_WINDOW
UI element name for the recently viewed window. -
SIMILAR_ITEMS_CONTAINER
UI element name for the container holding similar items.
-
-
Field Details
-
value
The string value associated with this enum constant, used for UI element identifiers.
-
-
Constructor Details
-
UIElementName
Constructs aUIElementNameenum 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 an identifier for UI elements.
-