Package dev.zemco.codegame.execution.io
Interface IOutputSink
- All Known Implementing Classes:
VerifyingInputSourceToOutputSinkAdapter
public interface IOutputSink
Destination of output values during execution that expects values until it becomes
satisfied.
Output sink may reject the output value, throwing NotAcceptedException.- Author:
- Erik Zemčík
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(int value) Attempts to writevalueto output.booleanReturns if sink expects another value.
-
Method Details
-
accept
void accept(int value) Attempts to writevalueto output.- Parameters:
value- value to output- Throws:
NotAcceptedException- ifvalueis not accepted output value
-
isSatisfied
boolean isSatisfied()Returns if sink expects another value.- Returns:
- true if sink expects another value else false
-