jdk/src/share/classes/java/lang/Iterable.java
changeset 21339 20e8b81964d5
parent 21334 c60dfce46a77
child 23040 0cb50d5761df
equal deleted inserted replaced
21338:ed59bead7654 21339:20e8b81964d5
    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)