java.lang
Interface Iterable<T>

All Known Subinterfaces:
BeanContext sample code for java.beans.beancontext.BeanContext definition code for java.beans.beancontext.BeanContext , BeanContextServices sample code for java.beans.beancontext.BeanContextServices definition code for java.beans.beancontext.BeanContextServices , BlockingQueue sample code for java.util.concurrent.BlockingQueue definition code for java.util.concurrent.BlockingQueue <E>, Collection sample code for java.util.Collection definition code for java.util.Collection <E>, List sample code for java.util.List definition code for java.util.List <E>, Queue sample code for java.util.Queue definition code for java.util.Queue <E>, Set sample code for java.util.Set definition code for java.util.Set <E>, SortedSet sample code for java.util.SortedSet definition code for java.util.SortedSet <E>
All Known Implementing Classes:
AbstractCollection sample code for java.util.AbstractCollection definition code for java.util.AbstractCollection , AbstractList sample code for java.util.AbstractList definition code for java.util.AbstractList , AbstractQueue sample code for java.util.AbstractQueue definition code for java.util.AbstractQueue , AbstractSequentialList sample code for java.util.AbstractSequentialList definition code for java.util.AbstractSequentialList , AbstractSet sample code for java.util.AbstractSet definition code for java.util.AbstractSet , ArrayBlockingQueue sample code for java.util.concurrent.ArrayBlockingQueue definition code for java.util.concurrent.ArrayBlockingQueue , ArrayList sample code for java.util.ArrayList definition code for java.util.ArrayList , AttributeList sample code for javax.management.AttributeList definition code for javax.management.AttributeList , BeanContextServicesSupport sample code for java.beans.beancontext.BeanContextServicesSupport definition code for java.beans.beancontext.BeanContextServicesSupport , BeanContextSupport sample code for java.beans.beancontext.BeanContextSupport definition code for java.beans.beancontext.BeanContextSupport , ConcurrentLinkedQueue sample code for java.util.concurrent.ConcurrentLinkedQueue definition code for java.util.concurrent.ConcurrentLinkedQueue , CopyOnWriteArrayList sample code for java.util.concurrent.CopyOnWriteArrayList definition code for java.util.concurrent.CopyOnWriteArrayList , CopyOnWriteArraySet sample code for java.util.concurrent.CopyOnWriteArraySet definition code for java.util.concurrent.CopyOnWriteArraySet , DelayQueue sample code for java.util.concurrent.DelayQueue definition code for java.util.concurrent.DelayQueue , EnumSet sample code for java.util.EnumSet definition code for java.util.EnumSet , HashSet sample code for java.util.HashSet definition code for java.util.HashSet , JobStateReasons sample code for javax.print.attribute.standard.JobStateReasons definition code for javax.print.attribute.standard.JobStateReasons , LinkedBlockingQueue sample code for java.util.concurrent.LinkedBlockingQueue definition code for java.util.concurrent.LinkedBlockingQueue , LinkedHashSet sample code for java.util.LinkedHashSet definition code for java.util.LinkedHashSet , LinkedList sample code for java.util.LinkedList definition code for java.util.LinkedList , PriorityBlockingQueue sample code for java.util.concurrent.PriorityBlockingQueue definition code for java.util.concurrent.PriorityBlockingQueue , PriorityQueue sample code for java.util.PriorityQueue definition code for java.util.PriorityQueue , RoleList sample code for javax.management.relation.RoleList definition code for javax.management.relation.RoleList , RoleUnresolvedList sample code for javax.management.relation.RoleUnresolvedList definition code for javax.management.relation.RoleUnresolvedList , Stack sample code for java.util.Stack definition code for java.util.Stack , SynchronousQueue sample code for java.util.concurrent.SynchronousQueue definition code for java.util.concurrent.SynchronousQueue , TreeSet sample code for java.util.TreeSet definition code for java.util.TreeSet , Vector sample code for java.util.Vector definition code for java.util.Vector

public interface Iterable<T>

Implementing this interface allows an object to be the target of the "foreach" statement.


Method Summary
 Iterator sample code for java.util.Iterator definition code for java.util.Iterator <T> iterator sample code for java.lang.Iterable.iterator() definition code for java.lang.Iterable.iterator() ()
          Returns an iterator over a set of elements of type T.
 

Method Detail

iterator sample code for java.lang.Iterable.iterator() definition code for java.lang.Iterable.iterator()

Iterator sample code for java.util.Iterator definition code for java.util.Iterator <T> iterator()
Returns an iterator over a set of elements of type T.

Returns:
an Iterator.