boolean (X x) { if (!myFirstFinished && !myFirstProcessor.process(x)) { myFirstFinished = true; } if (!mySecondFinished && !mySecondProcessor.process(x)) { mySecondFinished = true; } return !myFirstFinished || !mySecondFinished; }