T
- the item typepublic class GridDataView<T> extends AbstractDataView<T>
component, dataProviderSupplier, NULL_IDENTIFIER_ERROR_MESSAGE, NULL_ITEM_ERROR_MESSAGE
Constructor and Description |
---|
GridDataView(DataCommunicator<T> dataCommunicator,
Grid<T> grid) |
Modifier and Type | Method and Description |
---|---|
T |
getItem(int index)
Gets the item at the given index from the data available to the
component.
|
Stream<T> |
getItems()
Get the full data available to the component.
|
protected Class<?> |
getSupportedDataProviderType()
Returns supported
DataProvider type for this DataView . |
void |
setIdentifierProvider(IdentifierProvider<T> identifierProvider)
Sets an identifier provider, which returns an identifier for the given
item.
|
addItemCountChangeListener, equals, getIdentifierProvider, refreshAll, refreshItem, verifyDataProviderType
public GridDataView(DataCommunicator<T> dataCommunicator, Grid<T> grid)
public T getItem(int index)
DataView
index
- item index numberprotected Class<?> getSupportedDataProviderType()
AbstractDataView
DataProvider
type for this DataView
.getSupportedDataProviderType
in class AbstractDataView<T>
public Stream<T> getItems()
DataView
public void setIdentifierProvider(IdentifierProvider<T> identifierProvider)
DataView
dataView.setIdentifiedProvider(Item::getId);
.setIdentifierProvider
in interface DataView<T>
setIdentifierProvider
in class AbstractDataView<T>
identifierProvider
- function that returns the non-null identifier for a given itemCopyright © 2021. All rights reserved.