T - the type of the displayed itempublic interface HasItems<T> extends Serializable
| Modifier and Type | Method and 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.
|
void setItems(Collection<T> items)
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.
items - the data items to display, not nulldefault void setItems(T... items)
items - the data items to display, the array must not be nullsetItems(Collection)default void setItems(Stream<T> streamOfItems)
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.
streamOfItems - the stream of data items to display, not nullsetItems(Collection)Copyright © 2025. All rights reserved.