com.vaadin.flow.data.provider.
Interface ItemIndexProvider<T,F>
Type Parameters:
T
- the type of the item
F
- the type of the query filter
All Superinterfaces:
BiFunction<T,
, Serializable
, SerializableBiFunction<T,
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A callback interface that is used to provide the index of an item.
Callback gives the target item and the query as parameters to fetch the index. The index is the index of the item in the filtered and sorted data set. If the item is not found, null is expected as a return value.
There will be inconsistent index if the data set for the returned index is different from the component's data set. Changing the data set of either side during this call may cause inconsistent index as a result.
Item index provider is only relevant with lazy data view implementations.
Since:
, 24.4
-
Method Summary
Methods inherited from interface java.util.function.BiFunction
andThen
-
Method Details
-
apply
Gets the index of the item in the filtered and sorted data set.
There will be inconsistent index if the data set for the returned index is different from the component's data set. Changing the data set of either side during this call may cause inconsistent index as a result.
The query parameter provides a filter object being set with
ConfigurableFilterDataProvider
or provided by a component, e.g. a string filter in ComboBox.
-