Dart API Referencedart:coreIterable<E>

Iterable<E> abstract class

The Iterable interface allows to get an Iterator out of an Iterable object.

This interface is used by the for-in construct to iterate over an Iterable object. The for-in construct takes an Iterable object at the right-hand side, and calls its iterator method to get an Iterator on it.

A user-defined class that implements the Iterable interface can be used as the right-hand side of a for-in construct.

abstract class Iterable<E> {
  /**
   * Returns an [Iterator] that iterates over this [Iterable] object.
   */
  Iterator<E> iterator();
}

Subclasses

Collection<E>, ConcreteTypeCartesianProduct, DartString, HierarchyIterable, IterableUtf16Decoder, IterableUtf32Decoder, IterableUtf8Decoder, Link<T>, NodeList, SourceString

Methods

Iterator<E> iterator() #

Returns an Iterator that iterates over this Iterable object.

Iterator<E> iterator();