Enum Class UIElementName

java.lang.Object
java.lang.Enum<UIElementName>
org.troy.capstone.constants.UIElementName
All Implemented Interfaces:
Serializable, Comparable<UIElementName>, Constable

public enum UIElementName extends Enum<UIElementName>
Enum for UI element names, to avoid hardcoding strings throughout the codebase and reduce risk of typos.
  • Enum Constant Details

    • FILTERS_CONTAINER

      public static final UIElementName FILTERS_CONTAINER
      UI element name for the container holding all filters.
    • SEARCHED_ITEM_PAGINATION

      public static final UIElementName SEARCHED_ITEM_PAGINATION
      UI element name for the container holding the pagination controls for searched items.
    • MIN_PRICE_SLIDER

      public static final UIElementName MIN_PRICE_SLIDER
      UI element name for the minimum price slider filter.
    • MAX_PRICE_SLIDER

      public static final UIElementName MAX_PRICE_SLIDER
      UI element name for the maximum price slider filter.
    • SEARCH_FIELD

      public static final UIElementName SEARCH_FIELD
      UI element name for the search query input field.
    • STAR_RATING_FILTER

      public static final UIElementName STAR_RATING_FILTER
      UI element name for the star rating filter.
    • SORTING_OPTION_DROPDOWN

      public static final UIElementName SORTING_OPTION_DROPDOWN
      UI element name for the sorting option dropdown.
    • RECENTLY_VIEWED_WINDOW

      public static final UIElementName RECENTLY_VIEWED_WINDOW
      UI element name for the recently viewed window.
    • SIMILAR_ITEMS_CONTAINER

      public static final UIElementName SIMILAR_ITEMS_CONTAINER
      UI element name for the container holding similar items.
  • Field Details

    • value

      private final String value
      The string value associated with this enum constant, used for UI element identifiers.
  • Constructor Details

    • UIElementName

      private UIElementName(String value)
      Constructs a UIElementName enum constant with the specified string value.
      Parameters:
      value - The string value to associate with this enum constant.
  • Method Details

    • values

      public static UIElementName[] 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 UIElementName 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
    • getValue

      public String 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.