Interface CollectionPreparer<T>
public interface CollectionPreparer<T>
Interface for functional preparation of a
MongoCollection
.- Since:
- 4.1
- Author:
- Mark Paluch
-
Method Summary
Modifier and TypeMethodDescriptiondefault CollectionPreparer<T>
andThen
(CollectionPreparer<T> after) Returns a composedCollectionPreparer
that first applies this preparer to the collection, and then applies theafter
preparer to the result.static <T> CollectionPreparer<T>
identity()
Returns a preparer that always returns its input collection.Prepare thecollection
.
-
Method Details
-
identity
Returns a preparer that always returns its input collection.- Returns:
- a preparer that always returns its input collection.
-
prepare
Prepare thecollection
.- Parameters:
collection
- the collection to prepare.- Returns:
- the prepared collection.
-
andThen
Returns a composedCollectionPreparer
that first applies this preparer to the collection, and then applies theafter
preparer to the result. If evaluation of either function throws an exception, it is relayed to the caller of the composed function.- Parameters:
after
- the collection preparer to apply after this function is applied.- Returns:
- a composed
CollectionPreparer
that first applies this preparer and then applies theafter
preparer.
-