Interface AddItemHandler<C extends HasItems<?,?,?>, S extends HasIdentifier<?,?>>

Type Parameters:
C - the type of the component that can contain items, extending HasItems
S - the type of the item to be added, extending HasIdentifier
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface AddItemHandler<C extends HasItems<?,?,?>, S extends HasIdentifier<?,?>>
A functional interface that defines a handler for adding items to components. The handler is invoked when an item is added to a component that implements the HasItems interface and where the item to be added implements the HasIdentifier interface.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onAdd(C component, S item)
    Handles the addition of an item to a component.
  • Method Details

    • onAdd

      void onAdd(C component, S item)
      Handles the addition of an item to a component. This method is invoked when an item is added to a component that supports items.
      Parameters:
      component - the component to which the item is being added
      item - the item to be added to the component