Module is.codion.common.model
Package is.codion.common.model.filter
Interface FilterModel.Refresher.Builder<T>
- Type Parameters:
T- the item type
- Enclosing interface:
FilterModel.Refresher<T>
public static interface FilterModel.Refresher.Builder<T>
Builds a
FilterModel.Refresher.-
Method Summary
Modifier and TypeMethodDescriptionbuild()items(@Nullable Supplier<Collection<T>> items) onException(@Nullable Consumer<Exception> onException) onResult(@Nullable Consumer<Collection<T>> onResult)
-
Method Details
-
items
- Parameters:
items- supplies the items during refresh, null for aFilterModel.Refresherwhich does nothing- Returns:
- this builder instance
-
onResult
- Parameters:
onResult- called with the result on each successful refresh, typically to replace the model items- Returns:
- this builder instance
-
onException
- Parameters:
onException- called in case of a failed refresh, rethrows by default- Returns:
- this builder instance
-
build
FilterModel.Refresher<T> build()- Returns:
- a new
FilterModel.Refresherinstance
-