org.rapla.components.util.iterator
Class NestedIterator
java.lang.Object
org.rapla.components.util.iterator.NestedIterator
- All Implemented Interfaces:
- Iterator
public abstract class NestedIterator
- extends Object
- implements Iterator
Successivly iterates over the elements specified in the nested Iterators.
Example of an recursive traversal of an Entity Tree:
class RecursiveEntityIterator extends NestedIterator {
public RecursiveEntityIterator(Iterator it) {
super(it);
}
public Iterator getNestedIterator(Object obj) {
return new RecursiveEntityIterator(((Entity)obj).getSubEntities());
}
}
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
outerIt
protected Iterator outerIt
innerIt
protected Iterator innerIt
NestedIterator
public NestedIterator(Iterator outerIt)
getNestedIterator
public abstract Iterator getNestedIterator(Object obj)
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface Iterator
remove
public void remove()
- Specified by:
remove
in interface Iterator
next
public Object next()
- Specified by:
next
in interface Iterator
Copyright © 2000-2006 Rapla Team. All Rights Reseserved.