Package org.cometd.common
Interface AsyncFoldLeft.Loop<R>
- Type Parameters:
R- the type of the result
- Enclosing class:
- AsyncFoldLeft
public static interface AsyncFoldLeft.Loop<R>
Controls the iteration over a sequence of elements, allowing to continue the iteration (with a result), break out of the iteration (with a result), or fail the iteration (with an exception).
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidMakes the loop fail (similarly to throwing an exception).default voidMakes the loop exit (similarly to thebreakstatement).default voidMakes the loop proceed to the next element (or the end of the loop).
-
Method Details
-
proceed
Makes the loop proceed to the next element (or the end of the loop).
- Parameters:
r- the result computed in the current iteration
-
leave
Makes the loop exit (similarly to the
breakstatement).- Parameters:
r- the result computed in the current iteration
-
fail
Makes the loop fail (similarly to throwing an exception).
- Parameters:
failure- the failure of the current iteration
-