Class Composite
java.lang.Object
org.apache.commons.functor.core.composite.Composite
Utility/fluent methods for creating composite functors.
- Version:
- $Revision$ $Date$
-
Constructor Summary
ConstructorsConstructorDescriptionCompositeinstances should NOT be constructed in standard programming. -
Method Summary
Modifier and TypeMethodDescriptionstatic <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.
-
Constructor Details
-
Composite
public Composite()Compositeinstances should NOT be constructed in standard programming. Instead, the methods of the class should be invoked statically.This constructor is public to permit tools that require a JavaBean instance to operate.
-
-
Method Details
-
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
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, UnaryCompositeBinaryPredicate<L,G, H> 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
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, CompositeUnaryFunction<A,T> 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, UnaryCompositeBinaryFunction<L,G, H, T> R, functionT> (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, BinaryCompositeBinaryFunction<L,G, H, T> R, functionT> (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
-