Interface ListProvider<T>


public interface ListProvider<T>
This interface provides the functionality to pass a list as an argument to methods without retrieving it's elements and can be used to avoid performance issues.
Example: The inspector functionality in the cockpit displays additional information for the currently selected items, so the method BrowserModel.getSelectedItems() must be invoked somewhere to pass its result to the inspector renderer. Since this can be a performance killer when CTRL+A was pressed and thousands of items are selected and it may not be useful to show all this items in the inspector but e.g. only the number of selected items, ListProvider is used as anonymous inner class to pass the list information.
  • Method Details

    • getList

      List<T> getList()
      Gets the list.
    • getFirst

      T getFirst()
      Gets the first element of the provided list.
      Returns:
      the first element or null, if list is empty.
    • getListInfo

      ListProvider.ListInfo getListInfo()
      Gets the ListProvider.ListInfo for the provided list.
      Returns:
      A ListProvider.ListInfo instance or null, if undefined.
    • getListSize

      int getListSize()
      Gets the size of the provided list or -1, if unknown.