Client and backend. This class is shared: the same code is compiled into your app and into your server, so everything on this page works in both.
public interface Iterable<T>
Known subtypesAbstractCollection, AbstractList, AbstractQueue, AbstractSequentialList, AbstractSet, ArrayDeque, ArrayList, Collection, Deque, HashSet, LinkedHashSet, LinkedList, List, NavigableSet, PriorityQueue, Queue, Set, SortedSet, Stack, TreeSet, Vector
Objects of classes that implement this interface can be used within a
foreach statement.Methods
public abstract Iterator<T> iterator() | Returns an Iterator for the elements in this object. |
public default void forEach(Consumer<? super T> action) | Performs the given action for each element of the Iterable. |
Method details
iterator
public abstract Iterator<T> iterator()Returns an
Iterator for the elements in this object.Returns
An
Iterator instance.forEach
public default void forEach(Consumer<? super T> action)Performs the given action for each element of the
Iterable.
Stubbed in the CLDC11 subset; the actual implementation comes
from the platform’s JDK at runtime.