Package | Description |
---|---|
org.apache.commons.functor.adapter |
Classes that adapt one functor interface to another.
|
org.apache.commons.functor.core |
Commonly used functor implementations.
|
org.apache.commons.functor.core.composite |
Functors composed of other functors.
|
org.apache.commons.functor.generator |
Contains code related to Generators.
|
org.apache.commons.functor.generator.loop |
Contains code related to Generators that control execution flow.
|
Modifier and Type | Class and Description |
---|---|
class |
BinaryProcedureProcedure<A>
Adapts a BinaryProcedure as a Procedure by sending the same argument to both sides of the BinaryProcedure.
|
class |
FunctionProcedure<A>
|
class |
LeftBoundProcedure<A>
Adapts a
BinaryProcedure
to the
Procedure interface
using a constant left-side argument. |
class |
NullaryProcedureProcedure<A>
|
class |
RightBoundProcedure<A>
Adapts a
BinaryProcedure
to the
Procedure interface
using a constant left-side argument. |
Modifier and Type | Method and Description |
---|---|
static <A> Procedure<A> |
BinaryProcedureProcedure.adapt(BinaryProcedure<? super A,? super A> procedure)
Adapt a BinaryProcedure as a Procedure.
|
Modifier and Type | Method and Description |
---|---|
static <A,T> ProcedureFunction<A,T> |
ProcedureFunction.adapt(Procedure<? super A> procedure)
Adapt a Procedure to the Function interface.
|
static <L,R> IgnoreRightProcedure<L,R> |
IgnoreRightProcedure.adapt(Procedure<? super L> procedure)
Adapt a Procedure to the BinaryProcedure interface.
|
static <L,R> IgnoreLeftProcedure<L,R> |
IgnoreLeftProcedure.adapt(Procedure<? super R> procedure)
Adapt a Procedure to the BinaryProcedure interface.
|
static <A> BoundNullaryProcedure |
BoundNullaryProcedure.bind(Procedure<? super A> procedure,
A arg)
Adapt the given, possibly-
null ,
Procedure to the
NullaryProcedure interface by binding
the specified Object as a constant
argument. |
Constructor and Description |
---|
BoundNullaryProcedure(Procedure<? super A> procedure,
A arg)
Create a new BoundNullaryProcedure instance.
|
IgnoreLeftProcedure(Procedure<? super R> procedure)
Create a new IgnoreLeftProcedure.
|
IgnoreRightProcedure(Procedure<? super L> procedure)
Create a new IgnoreRightProcedure.
|
ProcedureFunction(Procedure<? super A> procedure)
Create a new ProcedureFunction.
|
Modifier and Type | Class and Description |
---|---|
class |
NoOp
A procedure that does nothing at all.
|
Modifier and Type | Method and Description |
---|---|
static <A> Procedure<A> |
NoOp.unaryInstance()
Get a typed NoOp
Procedure . |
Modifier and Type | Class and Description |
---|---|
class |
CompositeProcedure<A>
|
class |
ConditionalProcedure<A>
A
Procedure
similiar to Java's "ternary"
or "conditional" operator (? : ). |
class |
Sequence<A>
|
Modifier and Type | Method and Description |
---|---|
static <A> Procedure<A> |
Conditional.procedure(Predicate<? super A> q,
Procedure<? super A> r)
Create a guarded Procedure.
|
static <A> Procedure<A> |
Conditional.procedure(Predicate<? super A> q,
Procedure<? super A> r,
Procedure<? super A> s)
Create a conditional Procedure.
|
Modifier and Type | Method and Description |
---|---|
static <A> Procedure<A> |
Conditional.procedure(Predicate<? super A> q,
Procedure<? super A> r)
Create a guarded Procedure.
|
static <A> Procedure<A> |
Conditional.procedure(Predicate<? super A> q,
Procedure<? super A> r,
Procedure<? super A> s)
Create a conditional Procedure.
|
static <A> Procedure<A> |
Conditional.procedure(Predicate<? super A> q,
Procedure<? super A> r,
Procedure<? super A> s)
Create a conditional Procedure.
|
static <A> CompositeProcedure<A> |
Composite.procedure(Procedure<? super A> procedure)
Create a composite Procedure.
|
static <A,T> CompositeProcedure<A> |
Composite.procedure(Procedure<? super T> procedure,
Function<? super A,? extends T> function)
Create a composite Procedure.
|
Sequence<A> |
Sequence.then(Procedure<? super A> p)
Fluently add a Procedure to the sequence.
|
Constructor and Description |
---|
CompositeProcedure(Procedure<? super A> procedure)
Create a new CompositeProcedure.
|
ConditionalProcedure(Predicate<? super A> ifPred,
Procedure<? super A> thenProc)
Create a new ConditionalProcedure.
|
ConditionalProcedure(Predicate<? super A> ifPred,
Procedure<? super A> thenProc,
Procedure<? super A> elseProc)
Create a new ConditionalProcedure.
|
ConditionalProcedure(Predicate<? super A> ifPred,
Procedure<? super A> thenProc,
Procedure<? super A> elseProc)
Create a new ConditionalProcedure.
|
Sequence(Procedure<? super A>... procedures)
Create a new Sequence instance.
|
TransformedBinaryProcedure(BinaryFunction<? super L,? super R,? extends X> function,
Procedure<? super X> procedure)
Create a new TransformedBinaryProcedure.
|
TransformedNullaryProcedure(NullaryFunction<? extends X> function,
Procedure<? super X> procedure)
Create a new TransformedNullaryProcedure.
|
Constructor and Description |
---|
Sequence(Iterable<Procedure<? super A>> procedures)
Create a new Sequence instance.
|
Modifier and Type | Method and Description |
---|---|
void |
Generator.run(Procedure<? super E> proc)
Generators must implement this method.
|
void |
FilteredGenerator.run(Procedure<? super E> proc)
Generators must implement this method.
|
Modifier and Type | Method and Description |
---|---|
void |
WhileGenerate.run(Procedure<? super E> proc)
Generators must implement this method.
|
void |
UntilGenerate.run(Procedure<? super E> proc)
Generators must implement this method.
|
void |
TransformedGenerator.run(Procedure<? super E> proc)
Generators must implement this method.
|
void |
IteratorToGeneratorAdapter.run(Procedure<? super E> proc)
Generators must implement this method.
|
void |
GenerateWhile.run(Procedure<? super E> proc)
Generators must implement this method.
|
void |
GenerateUntil.run(Procedure<? super E> proc)
Generators must implement this method.
|
Copyright © 2003–2014 The Apache Software Foundation. All rights reserved.