|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.jga.fn.adaptor.AdaptorFunctors
public final class AdaptorFunctors
Static factory methods for selected functors in the Adaptor package.
Copyright © 2006 David A. Hall
Constructor Summary | |
---|---|
AdaptorFunctors()
|
Method Summary | ||
---|---|---|
static
|
and(BinaryFunctor<T1,T2,java.lang.Boolean> uf1,
BinaryFunctor<T1,T2,java.lang.Boolean> uf2)
Returns a Boolean Functor that produces TRUE when both input functors return TRUE for same given pair of arguments. |
|
static Generator<java.lang.Boolean> |
and(Generator<java.lang.Boolean> g1,
Generator<java.lang.Boolean> g2)
Returns a Boolean Generator that produces TRUE when both input generators return TRUE. |
|
static
|
and(UnaryFunctor<T,java.lang.Boolean> uf1,
UnaryFunctor<T,java.lang.Boolean> uf2)
Returns a Boolean Functor that produces TRUE when both input functors return TRUE for same given argument. |
|
static
|
conditional(BinaryFunctor<T1,T2,java.lang.Boolean> test,
BinaryFunctor<T1,T2,R> trueFn)
Returns a functor that evaluates the test and, when true, evaluates the trueFn and returns the results. |
|
static
|
conditional(BinaryFunctor<T1,T2,java.lang.Boolean> test,
BinaryFunctor<T1,T2,R> trueFn,
BinaryFunctor<T1,T2,R> falseFn)
Returns a functor that evaluates the test and, when true, evaluates the trueFn and returns the results. |
|
static
|
conditional(Generator<java.lang.Boolean> test,
Generator<R> trueFn)
Returns a generator that evaluates the test and, when true, evaluates the trueFn and returns the results. |
|
static
|
conditional(Generator<java.lang.Boolean> test,
Generator<R> trueFn,
Generator<R> falseFn)
Returns a generator that evaluates the test and, when true, evaluates the trueFn and returns the results. |
|
static
|
conditional(UnaryFunctor<T,java.lang.Boolean> test,
UnaryFunctor<T,R> trueFn)
Returns a functor that evaluates the test and, when true, evaluates the trueFn and returns the results. |
|
static
|
conditional(UnaryFunctor<T,java.lang.Boolean> test,
UnaryFunctor<T,R> trueFn,
UnaryFunctor<T,R> falseFn)
Returns a functor that evaluates the test and, when true, evaluates the trueFn and returns the results. |
|
static
|
constant(R value)
|
|
static
|
constantBinary(R value)
|
|
static
|
constantUnary(R value)
|
|
static
|
identity()
|
|
static
|
or(BinaryFunctor<T1,T2,java.lang.Boolean> uf1,
BinaryFunctor<T1,T2,java.lang.Boolean> uf2)
Returns a Boolean Functor that produces TRUE when either input functors return TRUE for same given pair of arguments. |
|
static Generator<java.lang.Boolean> |
or(Generator<java.lang.Boolean> g1,
Generator<java.lang.Boolean> g2)
Returns a Boolean Generator that produces TRUE when either input generators return TRUE. |
|
static
|
or(UnaryFunctor<T,java.lang.Boolean> uf1,
UnaryFunctor<T,java.lang.Boolean> uf2)
Returns a Boolean Functor that produces TRUE when either input functors return TRUE for same given argument. |
|
static
|
project1st()
|
|
static
|
project2nd()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AdaptorFunctors()
Method Detail |
---|
public static Generator<java.lang.Boolean> and(Generator<java.lang.Boolean> g1, Generator<java.lang.Boolean> g2)
public static <T> UnaryFunctor<T,java.lang.Boolean> and(UnaryFunctor<T,java.lang.Boolean> uf1, UnaryFunctor<T,java.lang.Boolean> uf2)
public static <T1,T2> BinaryFunctor<T1,T2,java.lang.Boolean> and(BinaryFunctor<T1,T2,java.lang.Boolean> uf1, BinaryFunctor<T1,T2,java.lang.Boolean> uf2)
public static <R> Generator<R> conditional(Generator<java.lang.Boolean> test, Generator<R> trueFn)
public static <R> Generator<R> conditional(Generator<java.lang.Boolean> test, Generator<R> trueFn, Generator<R> falseFn)
public static <T,R> UnaryFunctor<T,R> conditional(UnaryFunctor<T,java.lang.Boolean> test, UnaryFunctor<T,R> trueFn)
public static <T,R> UnaryFunctor<T,R> conditional(UnaryFunctor<T,java.lang.Boolean> test, UnaryFunctor<T,R> trueFn, UnaryFunctor<T,R> falseFn)
public static <T1,T2,R> BinaryFunctor<T1,T2,R> conditional(BinaryFunctor<T1,T2,java.lang.Boolean> test, BinaryFunctor<T1,T2,R> trueFn)
public static <T1,T2,R> BinaryFunctor<T1,T2,R> conditional(BinaryFunctor<T1,T2,java.lang.Boolean> test, BinaryFunctor<T1,T2,R> trueFn, BinaryFunctor<T1,T2,R> falseFn)
public static <R> Generator<R> constant(R value)
public static <T,R> UnaryFunctor<T,R> constantUnary(R value)
public static <T1,T2,R> BinaryFunctor<T1,T2,R> constantBinary(R value)
public static <T> UnaryFunctor<T,T> identity()
public static Generator<java.lang.Boolean> or(Generator<java.lang.Boolean> g1, Generator<java.lang.Boolean> g2)
public static <T> UnaryFunctor<T,java.lang.Boolean> or(UnaryFunctor<T,java.lang.Boolean> uf1, UnaryFunctor<T,java.lang.Boolean> uf2)
public static <T1,T2> BinaryFunctor<T1,T2,java.lang.Boolean> or(BinaryFunctor<T1,T2,java.lang.Boolean> uf1, BinaryFunctor<T1,T2,java.lang.Boolean> uf2)
public static <T1,T2> BinaryFunctor<T1,T2,T1> project1st()
public static <T1,T2> BinaryFunctor<T1,T2,T2> project2nd()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |