Package com.vaadin.ui

Interface ComboBox.FetchItemsCallback<T>

  • Type Parameters:
    T - item (bean) type in ComboBox
    All Superinterfaces:
    java.io.Serializable
    Enclosing class:
    ComboBox<T>
    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 static interface ComboBox.FetchItemsCallback<T>
    extends java.io.Serializable
    A callback method for fetching items. The callback is provided with a non-null string filter, offset index and limit.
    Since:
    8.0
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.stream.Stream<T> fetchItems​(java.lang.String filter, int offset, int limit)
      Returns a stream of items that match the given filter, limiting the results with given offset and limit.
    • Method Detail

      • fetchItems

        java.util.stream.Stream<T> fetchItems​(java.lang.String filter,
                                              int offset,
                                              int limit)
        Returns a stream of items that match the given filter, limiting the results with given offset and limit.

        This method is called after the size of the data set is asked from a related size callback. The offset and limit are promised to be within the size of the data set.

        Parameters:
        filter - a non-null filter string
        offset - the first index to fetch
        limit - the fetched item count
        Returns:
        stream of items