|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.jga.algorithms.Transform.AdjacentIterator<T,R>
public static class Transform.AdjacentIterator<T,R>
Iterator that applies a given BinaryFunctor to successive pairs of elements from a given iterator, returning the results as elements.
Constructor Summary | |
---|---|
Transform.AdjacentIterator(java.util.Iterator<? extends T> iter,
BinaryFunctor<T,T,R> fn)
Builds a TransormAdjacentIterator that applies the given functor to adjacent elements of the given base iterator. |
Method Summary | |
---|---|
boolean |
hasNext()
|
R |
next()
|
void |
remove()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Transform.AdjacentIterator(java.util.Iterator<? extends T> iter, BinaryFunctor<T,T,R> fn)
Method Detail |
---|
public boolean hasNext()
hasNext
in interface java.util.Iterator<R>
public R next()
next
in interface java.util.Iterator<R>
public void remove()
remove
in interface java.util.Iterator<R>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |