net.ontopia.utils
Class IteratorIterator<T>
java.lang.Object
net.ontopia.utils.IteratorIterator<T>
- All Implemented Interfaces:
- java.util.Iterator<T>
public class IteratorIterator<T>
- extends java.lang.Object
- implements java.util.Iterator<T>
INTERNAL: An iterator that works as a facade for multiple
iterators. The iterator represents the sum of all the
iterators.
Field Summary |
protected java.util.Iterator<java.util.Iterator<T>> |
colls_iter
|
protected java.util.Iterator<T> |
iter
|
Constructor Summary |
IteratorIterator(java.util.Collection<java.util.Collection<T>> colls_or_iters)
|
IteratorIterator(java.util.Iterator<java.util.Iterator<T>> colls_or_iters)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
colls_iter
protected java.util.Iterator<java.util.Iterator<T>> colls_iter
iter
protected java.util.Iterator<T> iter
IteratorIterator
public IteratorIterator(java.util.Collection<java.util.Collection<T>> colls_or_iters)
- Parameters:
colls_or_iters
- a collection of collections or iterators.
IteratorIterator
public IteratorIterator(java.util.Iterator<java.util.Iterator<T>> colls_or_iters)
getNextIterator
protected java.util.Iterator<T> getNextIterator()
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface java.util.Iterator<T>
next
public T next()
- Specified by:
next
in interface java.util.Iterator<T>
remove
public void remove()
- Specified by:
remove
in interface java.util.Iterator<T>
Copyright © 2000-2012 Ontopia.