java.lang

Interface Iterable<E>

public interface Iterable<E>

This interface is used to indicate that a given class can be iterated over. The compiler uses this interface to determine which classes are suitable targets of the foreach construct.

Since: 1.5

Method Summary
Iterator<E>iterator()
Returns an iterator for the collection.

Method Detail

iterator

public Iterator<E> iterator()
Returns an iterator for the collection.

Returns: an iterator.