|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.jga.fn.Functor<java.lang.Object[]> net.sf.jga.parser.Multiplex
public class Multiplex
Routes an array of values to a given array of unary functions, returning an array containing the results. If the number of values passed to evaluation is less than the number of functions, then nulls are returned in the unused positions. If the number of values passed to evaluation is greated than the number of functions, the excess arguments are ignored.
Constructor Summary | |
---|---|
Multiplex(UnaryFunctor[] branches)
|
Method Summary | |
---|---|
java.lang.Object[] |
eval(java.lang.Object... args)
Returns an array containing the results obtained by passing the args to the array of functions given at construction. |
Methods inherited from class net.sf.jga.fn.Functor |
---|
accept, bind0th, bindNth, composeNth, composeNth, generateNth |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Multiplex(UnaryFunctor[] branches)
Method Detail |
---|
public java.lang.Object[] eval(java.lang.Object... args)
eval
in class Functor<java.lang.Object[]>
java.lang.ClassCastException
- if one of the arguments is not of the correct type
for the corresponding function.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |