Iterable (Java 2 Platform SE 5.0) (original) (raw)


java.lang

Interface Iterable

All Known Subinterfaces:

BeanContext, BeanContextServices, BlockingQueue, Collection, List, Queue, Set, SortedSet

All Known Implementing Classes:

AbstractCollection, AbstractList, AbstractQueue, AbstractSequentialList, AbstractSet, ArrayBlockingQueue, ArrayList, AttributeList, BeanContextServicesSupport, BeanContextSupport, ConcurrentLinkedQueue, CopyOnWriteArrayList, CopyOnWriteArraySet, DelayQueue, EnumSet, HashSet, JobStateReasons, LinkedBlockingQueue, LinkedHashSet, LinkedList, PriorityBlockingQueue, PriorityQueue, RoleList, RoleUnresolvedList, Stack, SynchronousQueue, TreeSet, Vector


public interface Iterable

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


Method Summary
Iterator<T> iterator() Returns an iterator over a set of elements of type T.
Method Detail

iterator

Iterator<T> iterator()

Returns an iterator over a set of elements of type T.

Returns:

an Iterator.



Submit a bug or feature
For further API reference and developer documentation, see Java 2 SDK SE Developer Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.

Copyright © 2004, 2010 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.