Package com.vaadin.event.selection
Interface SelectionEvent<T>
-
- Type Parameters:
T- the data type of the selection model
- All Superinterfaces:
HasUserOriginated,Serializable
- All Known Implementing Classes:
MultiSelectionEvent,SingleSelectionEvent
public interface SelectionEvent<T> extends HasUserOriginated
A selection event that unifies the way to access to selection event for multi selection and single selection components (in case when only one selected item is required).- Since:
- 8.0
- Author:
- Vaadin Ltd
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Set<T>getAllSelectedItems()Gets all the currently selected items.Optional<T>getFirstSelectedItem()Get first selected data item.-
Methods inherited from interface com.vaadin.event.HasUserOriginated
isUserOriginated
-
-
-
-
Method Detail
-
getFirstSelectedItem
Optional<T> getFirstSelectedItem()
Get first selected data item.This is the same as
SingleSelectionEvent.getSelectedItem()in case of single selection and the first selected item fromMultiSelectionEvent.getNewSelection()in case of multi selection.- Returns:
- the first selected item.
-
-