Class SelectItemData<T>

java.lang.Object
de.xima.fc.gui.model.SelectItemData<T>
Type Parameters:
T - The type of the value of the select item.
All Implemented Interfaces:
Serializable

public final class SelectItemData<T> extends Object implements Serializable
Data of a SelectItem that is located somewhere inside a (possibly nested) tree of SelectItemGroups. Contains all data from the select item, as well as a list of the labels of all parent groups, starting with the outermost group and ending with the innermost group.
Since:
8.5.4
See Also:
  • Method Details

    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Object
    • getStatus

      public SelectItemStatus getStatus()
      Gets the status of the select item, which contains all metadata from the select item (except for the value).
      Returns:
      The status of the select item.
    • getValue

      public T getValue()
      Gets the value of the select item.
      Returns:
      The value of the select item.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • forFlattenedSelectItems

      public static List<SelectItemData<?>> forFlattenedSelectItems(Iterable<? extends javax.faces.model.SelectItem> items)
      Creates a flattened list of select item data for all select items in the given iterable, including all select items nested inside select item groups. The group names of all parent groups are included in the resulting select item data as SelectItemStatus.getGroupNames(). If a value filter is provided, only select items whose value matches the filter are included in the result.
      Parameters:
      items - The select items to flatten.
      Returns:
      A flattened list of select item data for all select items.
    • forSelectItem

      public static SelectItemData<?> forSelectItem(javax.faces.model.SelectItem item, Collection<String> groupNames)
      Creates select item data for the given select item and group names.
      Parameters:
      item - The select item to create the data for.
      groupNames - The group names of all parent groups that contain the select item, starting with the outermost group and ending with the innermost group. If the select item is not located inside any group, this list should be empty.
      Returns:
      Select item data for the given select item and group names.