net.sf.jga.fn.adaptor
public class ChainUnary<T,F,R> extends AbstractUnaryFunctor<T,R> implements Serializable
Copyright © 2002 David A. Hall
Nested Class Summary | |
---|---|
interface | ChainUnary.Visitor
Interface for classes that may interpret a ChainUnary functor. |
Constructor Summary | |
---|---|
ChainUnary(UnaryFunctor<F,R> f, UnaryFunctor<T,F> g)
Builds a BinaryCompose functor, given the outer functor f the
inner functor g. |
Method Summary | |
---|---|
void | accept(Visitor v)
Calls the Visitor's visit(BinaryCompose) method, if it
implements the nested Visitor interface. |
R | fn(T x)
Given argument x, passes x to the inner functor, and passes the
result to the outer functor.
|
UnaryFunctor<T,F> | getInnerFn()
Returns the inner functor |
UnaryFunctor<F,R> | getOuterFn()
Returns the outer functor |
String | toString() |
Throws: IllegalArgumentException if any of the functors is missing
visit(BinaryCompose)
method, if it
implements the nested Visitor interface.Returns: f(g(x))
Returns: the inner functor
Returns: the outer functor