|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.rice.cs.plt.iter.CollapsedIterator<T>
public class CollapsedIterator<T>
An iterator over an arbitrary number of iterators. Supports remove()
.
Constructor Summary | |
---|---|
CollapsedIterator(Iterator<? extends Iterator<? extends T>> iters)
The result traverses i1 , then i2 |
Method Summary | ||
---|---|---|
int |
compositeHeight()
Get the maximum path length from this node to a leaf. |
|
int |
compositeSize()
Get the number of nodes in the tree rooted at this node. |
|
boolean |
hasNext()
|
|
static
|
make(Iterator<? extends Iterator<? extends T>> iters)
Call the constructor (allows T to be inferred) |
|
T |
next()
|
|
void |
remove()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CollapsedIterator(Iterator<? extends Iterator<? extends T>> iters)
i1
, then i2
Method Detail |
---|
public int compositeHeight()
Composite
compositeHeight
in interface Composite
public int compositeSize()
Composite
compositeSize
in interface Composite
public boolean hasNext()
hasNext
in interface Iterator<T>
public T next()
next
in interface Iterator<T>
public void remove()
remove
in interface Iterator<T>
public static <T> CollapsedIterator<T> make(Iterator<? extends Iterator<? extends T>> iters)
T
to be inferred)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |