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.collection |
Collection -based functors, algorithms and utilities. |
org.apache.commons.functor.core.comparator |
Comparator - and
Comparable -based functors, algorithms and utilities. |
org.apache.commons.functor.core.composite |
Functors composed of other functors.
|
Modifier and Type | Class and Description |
---|---|
class |
BinaryFunctionBinaryPredicate<L,R>
|
class |
IgnoreLeftPredicate<L,R>
Adapts a
Predicate
to the
BinaryPredicate interface
by ignoring the first binary argument. |
class |
IgnoreRightPredicate<L,R>
Adapts a
Predicate
to the
BinaryPredicate interface
by ignoring the second binary argument. |
Modifier and Type | Method and Description |
---|---|
static <A> Predicate<A> |
BinaryPredicatePredicate.adapt(BinaryPredicate<? super A,? super A> predicate)
Adapt a BinaryPredicate as a Predicate.
|
static <L,R> BinaryPredicateBinaryFunction<L,R> |
BinaryPredicateBinaryFunction.adapt(BinaryPredicate<? super L,? super R> predicate)
|
static <L,R> LeftBoundPredicate<R> |
LeftBoundPredicate.bind(BinaryPredicate<? super L,? super R> predicate,
L arg)
Adapt a BinaryPredicate to the Predicate interface.
|
static <L,R> FullyBoundNullaryPredicate |
FullyBoundNullaryPredicate.bind(BinaryPredicate<? super L,? super R> predicate,
L left,
R right)
Adapt a BinaryPredicate to the NullaryPredicate interface.
|
static <L,R> RightBoundPredicate<L> |
RightBoundPredicate.bind(BinaryPredicate<? super L,? super R> predicate,
R arg)
Adapt a BinaryPredicate as a Predicate.
|
Constructor and Description |
---|
BinaryPredicateBinaryFunction(BinaryPredicate<? super L,? super R> predicate)
Create a new BinaryPredicateBinaryFunction.
|
BinaryPredicatePredicate(BinaryPredicate<? super A,? super A> predicate)
Create a new BinaryPredicatePredicate.
|
FullyBoundNullaryPredicate(BinaryPredicate<? super L,? super R> predicate,
L left,
R right)
Create a new FullyBoundNullaryPredicate instance.
|
LeftBoundPredicate(BinaryPredicate<? super L,? super A> predicate,
L arg)
Create a new LeftBoundPredicate.
|
RightBoundPredicate(BinaryPredicate<? super A,? super R> predicate,
R arg)
Create a new RightBoundPredicate.
|
Modifier and Type | Class and Description |
---|---|
class |
Constant<T>
Evaluates to constant value. |
class |
IsEqual<L,R>
|
class |
IsInstance<T>
|
class |
IsNotEqual<L,R>
|
class |
IsNotSame<L,R>
Tests the reference (! |
class |
IsSame<L,R>
Tests the reference (==) equality of its arguments. |
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. |
Modifier and Type | Field and Description |
---|---|
static BinaryPredicate<Object,Object> |
IsNull.LEFT
Left-handed BinaryPredicate.
|
static BinaryPredicate<Object,Object> |
IsNotNull.LEFT
Left-handed BinaryPredicate.
|
static BinaryPredicate<Object,Boolean> |
RightIdentity.PREDICATE
Right-identity predicate.
|
static BinaryPredicate<Boolean,Object> |
LeftIdentity.PREDICATE
Left-identity predicate.
|
static BinaryPredicate<Object,Object> |
IsNull.RIGHT
Right-handed BinaryPredicate.
|
static BinaryPredicate<Object,Object> |
IsNotNull.RIGHT
Right-handed BinaryPredicate.
|
Modifier and Type | Method and Description |
---|---|
static <A> BinaryPredicate<A,Object> |
IsNull.left()
Get a BinaryPredicate that matches if the left argument is null.
|
static <A> BinaryPredicate<A,Object> |
IsNotNull.left()
Get a BinaryPredicate that matches if the left argument is not null.
|
static <L> BinaryPredicate<L,Boolean> |
RightIdentity.predicate()
Get a typed right-identity BinaryPredicate.
|
static <R> BinaryPredicate<Boolean,R> |
LeftIdentity.predicate()
Get a left-identity BinaryPredicate.
|
static <A> BinaryPredicate<Object,A> |
IsNull.right()
Get a BinaryPredicate that matches if the right argument is null.
|
static <A> BinaryPredicate<Object,A> |
IsNotNull.right()
Get a BinaryPredicate that matches if the right argument is null.
|
Modifier and Type | Class and Description |
---|---|
class |
GeneratorContains<T>
|
Modifier and Type | Class and Description |
---|---|
class |
IsElementOf<L,R>
A
BinaryPredicate that checks to see if the
specified object is an element of the specified
Collection. |
Modifier and Type | Class and Description |
---|---|
class |
IsEquivalent<T>
A
BinaryPredicate that tests
true iff the left argument is equal to the
right argument under the specified Comparator . |
class |
IsGreaterThan<T>
A
BinaryPredicate that tests
true iff the left argument is greater than the
right argument under the specified Comparator . |
class |
IsGreaterThanOrEqual<T>
A
BinaryPredicate that tests
true iff the left argument is greater than or equal
to the right argument under the specified Comparator . |
class |
IsLessThan<T>
A
BinaryPredicate that tests
true iff the left argument is greater than the
right argument under the specified Comparator . |
class |
IsLessThanOrEqual<T>
A
BinaryPredicate that tests
true iff the left argument is less than or equal to the
right argument under the specified Comparator . |
class |
IsNotEquivalent<T>
A
BinaryPredicate that tests
true iff the left argument is not equal to the
right argument under the specified Comparator . |
Modifier and Type | Class and Description |
---|---|
class |
BinaryAnd<L,R>
|
class |
BinaryNot<L,R>
Tests to the logical inverse
of some other predicate. |
class |
BinaryOr<L,R>
|
class |
CompositeBinaryPredicate<L,R>
A
BinaryPredicate composed of
one binary predicate, p, and two
functions, f and g,
evaluating the ordered parameters x, y
to p(f(x),g(y)) . |
class |
ConditionalBinaryPredicate<L,R>
A
BinaryPredicate
similiar to Java's "ternary"
or "conditional" operator (? : ). |
class |
TransposedPredicate<L,R>
Transposes (swaps) the arguments to some other
predicate . |
Modifier and Type | Method and Description |
---|---|
static <L,R> BinaryPredicate<L,R> |
BinaryNot.not(BinaryPredicate<? super L,? super R> that)
Negate a BinaryPredicate.
|
static <L,R> BinaryPredicate<L,R> |
Conditional.predicate(BinaryPredicate<? super L,? super R> q,
BinaryPredicate<? super L,? super R> r,
BinaryPredicate<? super L,? super R> s)
Create a conditional BinaryPredicate.
|
Modifier and Type | Method and Description |
---|---|
BinaryAnd<L,R> |
BinaryAnd.and(BinaryPredicate<? super L,? super R> p)
And in a BinaryPredicate.
|
static <L,R,T> BinaryFunction<L,R,T> |
Conditional.function(BinaryPredicate<? super L,? super R> q,
BinaryFunction<? super L,? super R,? extends T> r,
BinaryFunction<? super L,? super R,? extends T> s)
Create a conditional BinaryFunction.
|
static <L,R> BinaryPredicate<L,R> |
BinaryNot.not(BinaryPredicate<? super L,? super R> that)
Negate a BinaryPredicate.
|
BinaryOr<L,R> |
BinaryOr.or(BinaryPredicate<? super L,? super R> p)
Fluently add a BinaryPredicate.
|
static <L,R,G,H> CompositeBinaryPredicate<L,R> |
Composite.predicate(BinaryPredicate<? super G,? super H> p,
Function<? super L,? extends G> g,
Function<? super R,? extends H> h)
Create a composite BinaryPredicate.
|
static <L,R> BinaryPredicate<L,R> |
Conditional.predicate(BinaryPredicate<? super L,? super R> q,
BinaryPredicate<? super L,? super R> r,
BinaryPredicate<? super L,? super R> s)
Create a conditional BinaryPredicate.
|
static <L,R> BinaryPredicate<L,R> |
Conditional.predicate(BinaryPredicate<? super L,? super R> q,
BinaryPredicate<? super L,? super R> r,
BinaryPredicate<? super L,? super R> s)
Create a conditional BinaryPredicate.
|
static <L,R> BinaryPredicate<L,R> |
Conditional.predicate(BinaryPredicate<? super L,? super R> q,
BinaryPredicate<? super L,? super R> r,
BinaryPredicate<? super L,? super R> s)
Create a conditional BinaryPredicate.
|
static <L,R> BinaryProcedure<L,R> |
Conditional.procedure(BinaryPredicate<? super L,? super R> q,
BinaryProcedure<? super L,? super R> r)
Create a guarded BinaryProcedure.
|
static <L,R> BinaryProcedure<L,R> |
Conditional.procedure(BinaryPredicate<? super L,? super R> q,
BinaryProcedure<? super L,? super R> r,
BinaryProcedure<? super L,? super R> s)
Create a conditional BinaryProcedure.
|
static <L,R> TransposedPredicate<R,L> |
TransposedPredicate.transpose(BinaryPredicate<? super L,? super R> p)
Return the transposition of
p . |
Constructor and Description |
---|
BinaryAnd(BinaryPredicate<? super L,? super R>... predicates)
Create a new BinaryAnd instance.
|
BinaryNot(BinaryPredicate<? super L,? super R> predicate)
Create a new BinaryNot.
|
BinaryOr(BinaryPredicate<? super L,? super R>... predicates)
Create a new BinaryOr instance.
|
CompositeBinaryPredicate(BinaryPredicate<? super G,? super H> f,
Function<? super L,? extends G> g,
Function<? super R,? extends H> h)
Create a new CompositeBinaryPredicate.
|
ConditionalBinaryFunction(BinaryPredicate<? super L,? super R> ifPred,
BinaryFunction<? super L,? super R,? extends T> thenFunc,
BinaryFunction<? super L,? super R,? extends T> elseFunc)
Create a new ConditionalBinaryFunction.
|
ConditionalBinaryPredicate(BinaryPredicate<? super L,? super R> ifPred,
BinaryPredicate<? super L,? super R> thenPred,
BinaryPredicate<? super L,? super R> elsePred)
Create a new ConditionalBinaryPredicate.
|
ConditionalBinaryPredicate(BinaryPredicate<? super L,? super R> ifPred,
BinaryPredicate<? super L,? super R> thenPred,
BinaryPredicate<? super L,? super R> elsePred)
Create a new ConditionalBinaryPredicate.
|
ConditionalBinaryPredicate(BinaryPredicate<? super L,? super R> ifPred,
BinaryPredicate<? super L,? super R> thenPred,
BinaryPredicate<? super L,? super R> elsePred)
Create a new ConditionalBinaryPredicate.
|
ConditionalBinaryProcedure(BinaryPredicate<? super L,? super R> ifPred,
BinaryProcedure<? super L,? super R> thenProc)
Create a new ConditionalBinaryProcedure.
|
ConditionalBinaryProcedure(BinaryPredicate<? super L,? super R> ifPred,
BinaryProcedure<? super L,? super R> thenProc,
BinaryProcedure<? super L,? super R> elseProc)
Create a new ConditionalBinaryProcedure.
|
TransposedPredicate(BinaryPredicate<? super R,? super L> predicate)
Create a new TransposedPredicate.
|
Constructor and Description |
---|
BinaryAnd(Iterable<BinaryPredicate<? super L,? super R>> predicates)
Create a new BinaryAnd instance.
|
BinaryOr(Iterable<BinaryPredicate<? super L,? super R>> predicates)
Create a new BinaryOr instance.
|
Copyright © 2003–2014 The Apache Software Foundation. All rights reserved.