Interface StreamCallback<T,R,X extends Exception>

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 interface StreamCallback<T,R,X extends Exception>
  • Method Summary

    Modifier and Type
    Method
    Description
    withStream(Stream<T> stream)
    Will be invoked with a Stream<T>.
  • Method Details

    • withStream

      R withStream(Stream<T> stream) throws X
      Will be invoked with a Stream<T>. The stream will be closed when this callback returns.
      Parameters:
      stream - stream to be used only within scope of this callback
      Returns:
      The return value of the callback
      Throws:
      X - optional exception thrown by the callback