Interface QueryReducer<T>

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@PublicApi @FunctionalInterface public interface QueryReducer<T>
Used by QueryTraverser to reduce the fields of a Document (or part of it) to a single value.

How this happens in detail (pre vs post-order for example) is defined by QueryTraverser.

See QueryTraverser.reducePostOrder(QueryReducer, Object) and QueryTraverser.reducePreOrder(QueryReducer, Object)

  • Method Details

    • reduceField

      T reduceField(QueryVisitorFieldEnvironment fieldEnvironment, T acc)
      Called each time a field is visited.
      Parameters:
      fieldEnvironment - the environment to this call
      acc - the previous result
      Returns:
      the new result