net.sf.jga.algorithms
Class Transform.TransformIterator<T,R>

java.lang.Object
  extended by net.sf.jga.algorithms.Transform.TransformIterator<T,R>
All Implemented Interfaces:
java.util.Iterator<R>
Enclosing class:
Transform

public static class Transform.TransformIterator<T,R>
extends java.lang.Object
implements java.util.Iterator<R>


Constructor Summary
Transform.TransformIterator(java.util.Iterator<? extends T> iter, UnaryFunctor<T,R> fn)
          Builds a TransformIterator that applies the given functor to each element 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

Transform.TransformIterator

public Transform.TransformIterator(java.util.Iterator<? extends T> iter,
                                   UnaryFunctor<T,R> fn)
Builds a TransformIterator that applies the given functor to each element of the given base iterator.

Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator<R>

next

public R next()
Specified by:
next in interface java.util.Iterator<R>

remove

public void remove()
Specified by:
remove in interface java.util.Iterator<R>


Copyright © 2002-2006 David A. Hall. All Rights Reserved.