Module is.codion.common.model
Package is.codion.common.model.filter
Interface FilterModel.Items.Builder<T>
- Type Parameters:
T- the item type
- Enclosing interface:
FilterModel.Items<T>
public static interface FilterModel.Items.Builder<T>
Builds a
FilterModel.Items instance-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceProvides aFilterModel.Items.Builder.SortStepstatic interfaceProvides aFilterModel.Items.Builder -
Method Summary
Modifier and TypeMethodDescriptionbuild()included(FilterModel.IncludePredicate<T> included) items(Supplier<Collection<T>> items) Specifies the items supplier for theFilterModel.RefresherdrivingFilterModel.Items.refresh().listener(FilterModel.IncludedItems.ItemsListener itemsListener) onRefreshException(Consumer<Exception> onRefreshException) By default, exceptions during refresh are rethrown, use this method to handle async exceptions differently
-
Method Details
-
items
Specifies the items supplier for theFilterModel.RefresherdrivingFilterModel.Items.refresh(). Without one, refreshing does nothing.- Parameters:
items- supplies the items during refresh- Returns:
- this builder
-
onRefreshException
By default, exceptions during refresh are rethrown, use this method to handle async exceptions differently- Parameters:
onRefreshException- the exception handler to use during refresh- Returns:
- this builder
-
validator
- Parameters:
validator- the item validator- Returns:
- this builder
-
included
- Parameters:
included- the include predicate- Returns:
- this builder
-
listener
- Parameters:
itemsListener- theFilterModel.IncludedItems.ItemsListenerto add- Returns:
- this builder
-
build
FilterModel.Items<T> build()- Returns:
- a new
FilterModel.Itemsinstance
-