net.sf.jga.util

Class TransformIterator<T,R>

public class TransformIterator<T,R> extends Object implements Iterator<R>

Iterator that returns the results of applying the given functor to the elements of the given iterator.

Copyright © 2002 David A. Hall

Author: David A. Hall

Constructor Summary
TransformIterator(Iterator<? extends T> iter, UnaryFunctor<T,R> fn)
Method Summary
booleanhasNext()
Rnext()
voidremove()

Constructor Detail

TransformIterator

public TransformIterator(Iterator<? extends T> iter, UnaryFunctor<T,R> fn)

Method Detail

hasNext

public boolean hasNext()

next

public R next()

remove

public void remove()