for
statement (sometimes called the "for-each loop" statement).
for
statement
Modifier and Type | Method and Description |
---|---|
public default void | |
public Iterator | |
public default Spliterator | Returns: aSpliterator over the elements described by this
Iterable .Creates a |
forEach | back to summary |
---|---|
public default void forEach(Consumer<? super T> action) Performs the given action for each element of the The behavior of this method is unspecified if the action performs side-effects that modify the underlying source of elements, unless an overriding class has specified a concurrent modification policy. Implementation Specification The default implementation behaves as if:
|
iterator | back to summary |
---|---|
public Iterator Returns an iterator over elements of type
|
spliterator | back to summary |
---|---|
public default Spliterator Creates a Implementation Specification The default implementation creates an
early-binding
spliterator from the iterable's Implementation Note The default implementation should usually be overridden. The spliterator returned by the default implementation has poor splitting capabilities, is unsized, and does not report any spliterator characteristics. Implementing classes can nearly always provide a better implementation.
|