Interface IIterate<Element>

All Superinterfaces:
Iterable<Element>, Iterator<Element>

public interface IIterate<Element>
extends Iterator<Element>, Iterable<Element>

The IIterate interface allows the same method to provide an iterator and to be used in a foreach loop. For example, an intersection has a method, examineThings() that returns an object implementing IIterate. It can be used as

Iterator things = anIntersection.examineThings();
 {  Thing t =;
    // do something with t
as well as
for(Thing t : anIntersection.examineThings())
 {  // do something with t

Byron Weber Becker

Method Summary
Methods inherited from interface java.util.Iterator
hasNext, next, remove
Methods inherited from interface java.lang.Iterable