| net.sf.jga.fn.adaptor.ConditionalUnary
All known Subclasses: net.sf.jga.fn.AdaptorVisitor,
ConditionalUnary | public class ConditionalUnary extends UnaryFunctor (Code) | | UnaryFunctor that tests a condition, executes one of two given functors, and
returns the result. The argument used to evaluate the condition will also
be passed to whichever functor is executed. This functor implements the
traditional ?: operator.
Copyright © 2003-2005 David A. Hall
author: David A. Hall |
serialVersionUID | final static long serialVersionUID(Code) | | |
accept | public void accept(net.sf.jga.fn.Visitor v)(Code) | | Calls the Visitor's visit(ConditionalUnary) method, if it
implements the nested Visitor interface.
|
fn | public R fn(T x)(Code) | | Given argument x, evaluates test(x); if true, returns trueFn(x),
otherwise, returns falseFn(x).
test(x) ? trueFn(x) : falseFn(x) |
getFalseFunctor | public UnaryFunctor<T, R> getFalseFunctor()(Code) | | Returns the functor that is executed when the condition is false
the functor that is executed when the condition is false |
getTrueFunctor | public UnaryFunctor<T, R> getTrueFunctor()(Code) | | Returns the functor that is executed when the condition is true
the functor that is executed when the condition is true |
|
|