Package com.vaadin.ui

Interface ItemCollapseAllowedProvider<T>

  • Type Parameters:
    T - item data type
    All Superinterfaces:
    java.util.function.Predicate<T>, java.io.Serializable, SerializablePredicate<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 interface ItemCollapseAllowedProvider<T>
    extends SerializablePredicate<T>
    A callback interface for resolving whether client-side collapsing should be allowed for an item in a listing component that displays hierarchical data, such as TreeGrid.
    Since:
    8.1
    Author:
    Vaadin Ltd
    See Also:
    TreeGrid.setItemCollapseAllowedProvider(ItemCollapseAllowedProvider)
    • Method Detail

      • test

        boolean test​(T item)
        Returns whether collapsing is allowed for the given item.
        Specified by:
        test in interface java.util.function.Predicate<T>
        Parameters:
        item - the item to test
        Returns:
        true if collapse is allowed for the given item, false otherwise