| net.sf.jga.fn.adaptor.ConditionalGenerator
All known Subclasses: net.sf.jga.fn.AdaptorVisitor,
ConditionalGenerator | public class ConditionalGenerator extends Generator (Code) | | Generator 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(ConditionalGenerator) method, if it
implements the nested Visitor interface.
|
gen | public R gen()(Code) | | Given argument x, evaluates test(x); if true, returns trueFn(x),
otherwise, returns falseFn(x).
test() ? trueFn() : falseFn() |
getFalseFunctor | public Generator<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 Generator<R> getTrueFunctor()(Code) | | Returns the functor that is executed when the condition is true
the functor that is executed when the condition is true |
|
|