Class Composite
- java.lang.Object
-
- org.apache.commons.functor.core.composite.Composite
-
public final class Composite extends java.lang.ObjectUtility/fluent methods for creating composite functors.- Version:
- $Revision$ $Date$
-
-
Constructor Summary
Constructors Constructor Description Composite()Compositeinstances should NOT be constructed in standard programming.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <L,R,G,H,T>
BinaryCompositeBinaryFunction<L,R,T>function(BinaryFunction<? super G,? super H,? extends T> f, BinaryFunction<? super L,? super R,? extends G> g, BinaryFunction<? super L,? super R,? extends H> h)Create a compositeBinaryFunction. static <L,R,G,H,T>
UnaryCompositeBinaryFunction<L,R,T>function(BinaryFunction<? super G,? super H,? extends T> f, UnaryFunction<? super L,? extends G> g, UnaryFunction<? super R,? extends H> h)Create a compositeBinaryFunction. static <A,T>
CompositeUnaryFunction<A,T>function(UnaryFunction<? super A,? extends T> f)Create a composite UnaryFunction.static <A,X,T>
CompositeUnaryFunction<A,T>function(UnaryFunction<? super X,? extends T> f, UnaryFunction<? super A,? extends X> g)Create a composite UnaryFunction.static <L,R,G,H>
UnaryCompositeBinaryPredicate<L,R>predicate(BinaryPredicate<? super G,? super H> p, UnaryFunction<? super L,? extends G> g, UnaryFunction<? super R,? extends H> h)Create a composite BinaryPredicate.static <A> CompositeUnaryPredicate<A>predicate(UnaryPredicate<? super A> pred)Create a composite UnaryPredicate.static <A,T>
CompositeUnaryPredicate<A>predicate(UnaryPredicate<? super T> predicate, UnaryFunction<? super A,? extends T> function)Create a composite UnaryPredicate.static <A> CompositeUnaryProcedure<A>procedure(UnaryProcedure<? super A> procedure)Create a composite UnaryProcedure.static <A,T>
CompositeUnaryProcedure<A>procedure(UnaryProcedure<? super T> procedure, UnaryFunction<? super A,? extends T> function)Create a composite UnaryProcedure.
-
-
-
Method Detail
-
procedure
public static <A> CompositeUnaryProcedure<A> procedure(UnaryProcedure<? super A> procedure)
Create a composite UnaryProcedure.
-
procedure
public static <A,T> CompositeUnaryProcedure<A> procedure(UnaryProcedure<? super T> procedure, UnaryFunction<? super A,? extends T> function)
Create a composite UnaryProcedure.
-
predicate
public static <A> CompositeUnaryPredicate<A> predicate(UnaryPredicate<? super A> pred)
Create a composite UnaryPredicate.
-
predicate
public static <A,T> CompositeUnaryPredicate<A> predicate(UnaryPredicate<? super T> predicate, UnaryFunction<? super A,? extends T> function)
Create a composite UnaryPredicate.
-
predicate
public static <L,R,G,H> UnaryCompositeBinaryPredicate<L,R> predicate(BinaryPredicate<? super G,? super H> p, UnaryFunction<? super L,? extends G> g, UnaryFunction<? super R,? extends H> h)
Create a composite BinaryPredicate.- Type Parameters:
L- the output predicate left argument type.R- the output predicate right argument type.G- the input functions left argument type.H- the input functions right argument type.- Parameters:
p- BinaryPredicate to test output(f), output(g)g- left UnaryFunctionh- right UnaryFunction- Returns:
- BinaryPredicate
-
function
public static <A,T> CompositeUnaryFunction<A,T> function(UnaryFunction<? super A,? extends T> f)
Create a composite UnaryFunction.- Type Parameters:
A- the function argument type.T- the function returned value type.- Parameters:
f- UnaryFunction to apply to the output ofg- Returns:
- UnaryFunction
-
function
public static <A,X,T> CompositeUnaryFunction<A,T> function(UnaryFunction<? super X,? extends T> f, UnaryFunction<? super A,? extends X> g)
Create a composite UnaryFunction.- Type Parameters:
A- the function argument type.X- the function argument type.T- the function returned value type.- Parameters:
f- UnaryFunction to apply to the output ofgg- UnaryFunction to apply first- Returns:
- UnaryFunction
-
function
public static <L,R,G,H,T> UnaryCompositeBinaryFunction<L,R,T> function(BinaryFunction<? super G,? super H,? extends T> f, UnaryFunction<? super L,? extends G> g, UnaryFunction<? super R,? extends H> h)
Create a compositeBinaryFunction. - Type Parameters:
L- the output predicate left argument type.R- the output predicate right argument type.G- the input functions left argument type.H- the input functions right argument type. * @paramthe function returned value type. - Parameters:
f- BinaryFunction to apply to output(f), output(g)g- left UnaryFunctionh- right UnaryFunction- Returns:
- BinaryFunction
-
function
public static <L,R,G,H,T> BinaryCompositeBinaryFunction<L,R,T> function(BinaryFunction<? super G,? super H,? extends T> f, BinaryFunction<? super L,? super R,? extends G> g, BinaryFunction<? super L,? super R,? extends H> h)
Create a compositeBinaryFunction. - Type Parameters:
L- the output predicate left argument type.R- the output predicate right argument type.G- the input functions left argument type.H- the input functions right argument type. * @paramthe function returned value type. - Parameters:
f- BinaryFunction to apply to output(f), output(g)g- left BinaryFunctionh- right BinaryFunction- Returns:
- BinaryFunction
-
-