| 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.algorithm |
Various algorithm-esque functors.
|
| org.apache.commons.functor.core.composite |
Functors composed of other functors.
|
| Modifier and Type | Class and Description |
|---|---|
class |
BoundPredicate
Adapts a
UnaryPredicate
to the
Predicate interface
using a constant unary argument. |
class |
FullyBoundPredicate
Adapts a
BinaryPredicate
to the
UnaryPredicate interface
using a constant left-side argument. |
class |
FunctionPredicate
|
| Modifier and Type | Method and Description |
|---|---|
static PredicateFunction |
PredicateFunction.adapt(Predicate predicate)
Adapt a Predicate to the Function interface.
|
static <A> PredicateUnaryPredicate<A> |
PredicateUnaryPredicate.adapt(Predicate predicate)
Adapt a Predicate to the UnaryPredicate interface.
|
| Constructor and Description |
|---|
PredicateFunction(Predicate predicate)
Create a new PredicateFunction.
|
PredicateUnaryPredicate(Predicate predicate)
Create a new PredicateUnaryPredicate.
|
| Modifier and Type | Class and Description |
|---|---|
class |
Constant<T>
Evaluates to constant value. |
class |
Limit
A predicate that returns
true
the first n times it is invoked, and
false thereafter. |
class |
Offset
A predicate that returns
false
the first n times it is invoked, and
true thereafter. |
| Constructor and Description |
|---|
DoUntil(Procedure body,
Predicate test)
Create a new DoUntil.
|
DoWhile(Procedure body,
Predicate test)
Create a new DoWhile.
|
UntilDo(Predicate test,
Procedure body)
Create a new UntilDo.
|
WhileDo(Predicate test,
Procedure body)
Create a new WhileDo.
|
| Modifier and Type | Class and Description |
|---|---|
class |
And
|
class |
ConditionalPredicate
A
Predicate
similiar to Java's "ternary"
or "conditional" operator (? :). |
class |
Not
Tests to the logical inverse
of some other predicate. |
class |
Or
|
| Modifier and Type | Method and Description |
|---|---|
protected Predicate |
AbstractLoopProcedure.getCondition()
Get the condition.
|
static Predicate |
Not.not(Predicate that)
Get a Not instance for
that. |
static Predicate |
Conditional.predicate(Predicate q,
Predicate r,
Predicate s)
Create a conditional Predicate.
|
| Modifier and Type | Method and Description |
|---|---|
And |
And.and(Predicate p)
Add a Predicate.
|
static <T> Function<T> |
Conditional.function(Predicate q,
Function<? extends T> r,
Function<? extends T> s)
Create a conditional Function.
|
static Predicate |
Not.not(Predicate that)
Get a Not instance for
that. |
Or |
Or.or(Predicate p)
Fluently add a Predicate.
|
static Predicate |
Conditional.predicate(Predicate q,
Predicate r,
Predicate s)
Create a conditional Predicate.
|
static Procedure |
Conditional.procedure(Predicate q,
Procedure r)
Create a guarded Procedure.
|
static Procedure |
Conditional.procedure(Predicate q,
Procedure r,
Procedure s)
Create a conditional Procedure.
|
| Constructor and Description |
|---|
AbstractLoopProcedure(Predicate condition,
Procedure action)
Create a new AbstractLoopProcedure.
|
And(Predicate... predicates)
Create a new And instance.
|
ConditionalFunction(Predicate ifPred,
Function<? extends T> thenFunc,
Function<? extends T> elseFunc)
Create a new ConditionalFunction.
|
ConditionalPredicate(Predicate ifPred,
Predicate thenPred,
Predicate elsePred)
Create a new ConditionalPredicate.
|
ConditionalProcedure(Predicate ifPred,
Procedure thenProc)
Create a new ConditionalProcedure.
|
ConditionalProcedure(Predicate ifPred,
Procedure thenProc,
Procedure elseProc)
Create a new ConditionalProcedure.
|
DoWhileProcedure(Procedure action,
Predicate condition)
Create a new DoWhileProcedure.
|
Not(Predicate predicate)
Create a new Not.
|
Or(Predicate... predicates)
Create a new Or instance.
|
WhileDoProcedure(Predicate condition,
Procedure action)
Create a new WhileDoProcedure.
|
| Constructor and Description |
|---|
And(Iterable<Predicate> predicates)
Create a new And instance.
|
Or(Iterable<Predicate> predicates)
Create a new Or instance.
|
Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.