Interface HasItems<E extends Element,B extends TypedBuilder<E,B>,S>

Type Parameters:
E - the element type of the main component
B - the builder type of the main component
S - the type of the subcomponent (representing an item)

invalid @snippet
duplicated region
All Superinterfaces:
IsElement<E>, Iterable<S>, TypedBuilder<E,B>
All Known Implementing Classes:
Accordion, ActionList, ActionListGroup, AlertGroup, Breadcrumb, DataList, DescriptionList, ExpandableNavigationGroup, Form, JumpLinks, JumpLinksList, LabelGroup, List, MenuList, Navigation, NavigationGroup, ProgressStepper, SimpleList, SimpleListGroup, Tabs, Tbody, ToggleGroup, ToolbarContent, ToolbarFilterContent, ToolbarGroup, ToolbarToggleGroup, Tr, TreeView, TreeViewItem

public interface HasItems<E extends Element,B extends TypedBuilder<E,B>,S> extends Iterable<S>, TypedBuilder<E,B>, IsElement<E>
The HasItems interface represents a component that can contain a collection of items. It provides methods for adding, removing, and manipulating items within the component.

Often the child components implement ComponentContext and HasIdentifier.

  • Method Details

    • addItems

      default <T> B addItems(Iterable<T> items, Function<T,S> display)
    • addItem

      default B addItem(S item)
    • add

      B add(S item)
    • items

      default List<S> items()
    • size

      int size()
    • isEmpty

      boolean isEmpty()
    • contains

      boolean contains(String identifier)
    • item

      S item(String identifier)
    • clear

      void clear()