Interface TerminatingConsumer<T>

  • Type Parameters:
    T - the type of the input to the operation
    All Superinterfaces:
    java.util.function.Consumer<T>

    public interface TerminatingConsumer<T>
    extends java.util.function.Consumer<T>
    TerminatingConsumer is a Consumer Consumer that can request termination of the supplier once some condition is reached, for example some number of consumed results accepted. If termination is required override the terminationRequested() method to return true when termination state is reached.
    • Method Detail

      • terminationRequested

        default boolean terminationRequested()