Interface CollectionPreparer<T>


public interface CollectionPreparer<T>
Interface for functional preparation of a MongoCollection.
Since:
4.1
Author:
Mark Paluch
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a composed CollectionPreparer that first applies this preparer to the collection, and then applies the after preparer to the result.
    static <T> CollectionPreparer<T>
    Returns a preparer that always returns its input collection.
    prepare(T collection)
    Prepare the collection.
  • Method Details

    • identity

      static <T> CollectionPreparer<T> identity()
      Returns a preparer that always returns its input collection.
      Returns:
      a preparer that always returns its input collection.
    • prepare

      T prepare(T collection)
      Prepare the collection.
      Parameters:
      collection - the collection to prepare.
      Returns:
      the prepared collection.
    • andThen

      default CollectionPreparer<T> andThen(CollectionPreparer<T> after)
      Returns a composed CollectionPreparer that first applies this preparer to the collection, and then applies the after 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 the after preparer.