# Interface Iterable<T>

All Known Subinterfaces:
  `Collection<E>, Deque<E>, List<E>, NavigableSet<E>, Queue<E>, Set<E>, SortedSet<E>`

All Known Implementing Classes:
  `AbstractCollection, AbstractEditorComponent, AbstractList, AbstractQueue, AbstractSequentialList, AbstractSet, Accordion, Ads, ArrayDeque, ArrayList, ARView, AudioRecorderComponent, AutoCompleteTextComponent, BannerAd, BaseSpinner, BrowserComponent, ButtonList, Calendar, CameraView, ChatBubble, ChatInput, ChatView, CheckBoxList, ClearableTextField, CodeEditor, CollectionProperty, ComponentGroup, ComponentSelector, Container, ContainerList, DateSpinner, DateTimeSpinner, Dialog, Element, EmbeddedContainer, FileTree, FloatingHint, Form, GameSceneView, GameView, GenericSpinner, GeofenceManager, HashSet, HTMLComponent, HTMLElement, InfiniteContainer, InputComponent, InteractionDialog, InterFormContainer, LinkedHashSet, LinkedList, ListProperty, MapComponent, MapProperty, MapView, Media360View, MediaPlayer, MenuBar, MultiButton, NativeMap, NumericSpinner, OnOffSwitch, OtpField, PickerComponent, PriorityQueue, Progress, PropertyIndex, RadioButtonList, RenderView, RichTextArea, Scene, SetProperty, Sheet, SideMenuBar, SignatureComponent, SpanButton, SpanLabel, SpanMultiButton, SplitPane, Stack, StickyHeaderContainer, SwipeableContainer, SwitchList, Table, Tabs, TestRunnerComponent, TextComponent, TextComponentPassword, TextSelection.Span, TextSelection.Spans, TimeSpinner, Toolbar, Tree, TreeSet, Vector, VisionCameraView, VRView, WebBrowser`

public interface Iterable<T>

Objects of classes that implement this interface can be used within a `foreach` statement.

##### Since

1.5

- ## Method Summary

  Modifier and Type
  Method
  Description
  `default void`
  `forEach(Consumer<? super T> action)`
  Performs the given action for each element of the `Iterable`.
  `Iterator<T>`
  `iterator()`
  Returns an `Iterator` for the elements in this object.

- ## Method Details

  - ### iterator

    Iterator<T> iterator()

    Returns an `Iterator` for the elements in this object.

    ###### Returns

    An `Iterator` instance.

  - ### forEach

    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.