Interface Iteration.Continuation

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

@FunctionalInterface public static interface Iteration.Continuation
Encapsulates recursive iteration or a lazy block of code with side-effect.

Note that if after a yielded recursive iteration, the subsequent code expects state change (for example, the nodes being visited will keep changing during graph traversal), the subsequent code also needs to be yielded to be able to observe the expected state change.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    run()
    Runs the continuation.
  • Method Details

    • run

      void run()
      Runs the continuation. It will be called at most once throughout the stream.