Package com.vaadin.flow.data.binder
Interface HasItems<T>
-
- Type Parameters:
T
- the type of the displayed item
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
HasDataProvider<T>
,HasFilterableDataProvider<T,F>
,HasItemsAndComponents<T>
- All Known Implementing Classes:
IronList
,VirtualList
public interface HasItems<T> extends Serializable
Mixin interface for components that displays a collection of items.Note: this is gradually replaced by
HasListDataView
,HasLazyDataView
andHasDataView
in the components.- Since:
- 1.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
setItems(Collection<T> items)
Sets the data items of this component provided as a collection.default void
setItems(Stream<T> streamOfItems)
Sets the data items of this listing provided as a stream.default void
setItems(T... items)
Sets the data items of this listing.
-
-
-
Method Detail
-
setItems
void setItems(Collection<T> items)
Sets the data items of this component provided as a collection.The provided collection instance may be used as-is. Subsequent modification of the collection might cause inconsistent data to be shown in the component unless it is explicitly instructed to read the data again.
- Parameters:
items
- the data items to display, notnull
-
setItems
default void setItems(T... items)
Sets the data items of this listing.- Parameters:
items
- the data items to display, the array must not benull
- See Also:
setItems(Collection)
-
setItems
default void setItems(Stream<T> streamOfItems)
Sets the data items of this listing provided as a stream.This is just a shorthand for
setItems(Collection)
, that collects objects in the stream to a list. Thus, using this method, instead of its array and Collection variations, doesn't save any memory.- Parameters:
streamOfItems
- the stream of data items to display, notnull
- See Also:
setItems(Collection)
-
-