Package utility.function
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 ConsumerConsumer
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 Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default boolean
terminationRequested()
-