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 void
Makes the loop fail (similarly to throwing an exception).default void
Makes the loop exit (similarly to thebreak
statement).default void
Makes 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
break
statement).- 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
-