The Iterator class encapsulates the behavior required to sequentially access elements of a collection.
Instances of the Iterator class are referred to as iterators. Use iterators to iterate two or more collections where the iterations are not nested or when the state of an iteration (that is, the position in a collection) needs to be remembered and the iteration resumed later. (The
Create an iterator by using the createIterator method of the Collection class. (Instances of the Dictionary class provide methods that enable you to specify the start position of an iterator.)
For details about the methods defined in the Iterator class, see "Iterator Methods", in the following subsection.
ArrayIterator, DictIterator, ExternalIterator,