net.sf.jga.fn.adaptor
Class ApplyUnary<T>

java.lang.Object
  extended by net.sf.jga.fn.Functor<R>
      extended by net.sf.jga.fn.UnaryFunctor<T,java.lang.Object[]>
          extended by net.sf.jga.fn.adaptor.ApplyUnary<T>
All Implemented Interfaces:
java.io.Serializable, Visitable

public class ApplyUnary<T>
extends UnaryFunctor<T,java.lang.Object[]>

Produces an array containing the results of passing an input argument to a given set of unary functors.

Copyright © 2004-2005 David A. Hall

Author:
David A. Hall
See Also:
Serialized Form

Nested Class Summary
static interface ApplyUnary.Visitor
          Interface for classes that may interpret an ApplyUnary predicate.
 
Constructor Summary
ApplyUnary(UnaryFunctor<T,?>... functors)
           
 
Method Summary
 void accept(Visitor v)
          Calls the Visitor's visit(ApplyUnary) method, if it implements the nested Visitor interface.
 java.lang.Object[] fn(T arg)
          Executes the function and returns the result.
 UnaryFunctor<T,?>[] getFunctors()
           
 java.lang.String toString()
           
 
Methods inherited from class net.sf.jga.fn.UnaryFunctor
bind, bind0th, bindNth, compose, compose, compose, composeNth, composeNth, eval, generate, generateNth
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ApplyUnary

public ApplyUnary(UnaryFunctor<T,?>... functors)
Method Detail

getFunctors

public UnaryFunctor<T,?>[] getFunctors()

fn

public java.lang.Object[] fn(T arg)
Description copied from class: UnaryFunctor
Executes the function and returns the result.

Specified by:
fn in class UnaryFunctor<T,java.lang.Object[]>

accept

public void accept(Visitor v)
Calls the Visitor's visit(ApplyUnary) method, if it implements the nested Visitor interface.

Specified by:
accept in interface Visitable
Overrides:
accept in class Functor<java.lang.Object[]>

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


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