net.sf.jga.fn.algorithm
public class TransformUnary<T,R> extends AbstractUnaryFunctor<Iterator<? extends T>,TransformIterator<T,R>> implements Serializable
Copyright © 2003 David A. Hall
Nested Class Summary | |
---|---|
interface | TransformUnary.Visitor
Interface for classes that may interpret an TransformUnary functor. |
Constructor Summary | |
---|---|
TransformUnary(UnaryFunctor<T,R> fn)
Builds an TransformUnary functor that will apply the given functor to
elements in an iteration. |
Method Summary | |
---|---|
void | accept(Visitor v)
Calls the Visitor's visit(TransformUnary) method, if it
implements the nested Visitor interface. |
TransformIterator<T,R> | fn(Iterator<? extends T> iterator)
Apply the functor to each element in the iteration and return an iterator
over the results
|
UnaryFunctor<T,R> | getFunction()
Returns the functor used to process elements in an iteration. |
String | toString() |
Throws: IllegalArgumentException if the functor is null
visit(TransformUnary)
method, if it
implements the nested Visitor interface.Returns: an iterator over the results of the transformation