equal
deleted
inserted
replaced
49 * @return an Iterator. |
49 * @return an Iterator. |
50 */ |
50 */ |
51 Iterator<T> iterator(); |
51 Iterator<T> iterator(); |
52 |
52 |
53 /** |
53 /** |
54 * Performs the given action on the contents of the {@code Iterable}, in the |
54 * Performs the given action for each element of the {@code Iterable} |
55 * order elements occur when iterating, until all elements have been |
55 * until all elements have been processed or the action throws an |
56 * processed or the action throws an exception. Errors or runtime |
56 * exception. Unless otherwise specified by the implementing class, |
57 * exceptions thrown by the action are relayed to the caller. |
57 * actions are performed in the order of iteration (if an iteration order |
|
58 * is specified). Exceptions thrown by the action are relayed to the |
|
59 * caller. |
58 * |
60 * |
59 * @implSpec |
61 * @implSpec |
60 * <p>The default implementation behaves as if: |
62 * <p>The default implementation behaves as if: |
61 * <pre>{@code |
63 * <pre>{@code |
62 * for (T t : this) |
64 * for (T t : this) |