net.sf.jga.fn.adaptor
public class Bind1st<T1,T2,R> extends AbstractUnaryFunctor<T2,R> implements Serializable
Copyright © 2003 David A. Hall
Nested Class Summary | |
---|---|
interface | Bind1st.Visitor
Interface for classes that may interpret an Bind1st functor. |
Constructor Summary | |
---|---|
Bind1st(T1 constant, BinaryFunctor<T1,T2,R> fn)
Builds a Bind1st Functor with the given contant and child functor. |
Method Summary | |
---|---|
void | accept(Visitor v)
Calls the Visitor's visit(Bind1st) method, if it
implements the nested Visitor interface. |
R | fn(T2 x)
Given one argument, passes the constant value and the argument to the
child functor and returns the result.
|
T1 | getConstant()
Returns the constant value |
BinaryFunctor<T1,T2,R> | getFunction()
Returns the child functor for this functor |
String | toString() |
Throws: IllegalArgumentException if the functor is null.
visit(Bind1st)
method, if it
implements the nested Visitor interface.Returns: f(c,x)
Returns: the constant value
Returns: the child functor for this functor