|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rice.cs.plt.iter.MappedIterator<S,T>
public class MappedIterator<S,T>
An Iterator that applies a provided mapping lambda to each member of a source iterator.
remove() simply delegates to the source iterator.
| Constructor Summary | |
|---|---|
MappedIterator(java.util.Iterator<? extends S> source,
Lambda<? super S,? extends T> map)
|
|
| 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(java.util.Iterator<? extends S> source,
Lambda<? super S,? extends T> map)
Call the constructor (allows the type arguments 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 MappedIterator(java.util.Iterator<? extends S> source,
Lambda<? super S,? extends T> map)
| Method Detail |
|---|
public int compositeHeight()
Composite
compositeHeight in interface Compositepublic int compositeSize()
Composite
compositeSize in interface Compositepublic boolean hasNext()
hasNext in interface java.util.Iterator<T>public T next()
next in interface java.util.Iterator<T>public void remove()
remove in interface java.util.Iterator<T>
public static <S,T> MappedIterator<S,T> make(java.util.Iterator<? extends S> source,
Lambda<? super S,? extends T> map)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||