| 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.
|
| org.apache.commons.functor.generator |
Contains code related to Generators.
|
| Modifier and Type | Class and Description |
|---|---|
class |
BinaryPredicateUnaryPredicate<A>
Adapts a BinaryPredicate as a UnaryPredicate by sending the same argument to both sides of the BinaryPredicate.
|
class |
LeftBoundPredicate<A>
Adapts a
BinaryPredicate
to the
UnaryPredicate interface
using a constant left-side argument. |
class |
PredicateUnaryPredicate<A>
Adapts a
Predicate
to the
UnaryPredicate interface
by ignoring the given argument. |
class |
RightBoundPredicate<A>
Adapts a
BinaryPredicate
to the
UnaryPredicate interface
using a constant left-side argument. |
class |
UnaryFunctionUnaryPredicate<A>
|
| Modifier and Type | Method and Description |
|---|---|
static <A> UnaryPredicate<A> |
BinaryPredicateUnaryPredicate.adapt(BinaryPredicate<? super A,? super A> predicate)
Adapt a BinaryFunction as a UnaryFunction.
|
| Modifier and Type | Method and Description |
|---|---|
static <A> UnaryPredicateUnaryFunction<A> |
UnaryPredicateUnaryFunction.adapt(UnaryPredicate<? super A> predicate)
Adapt a UnaryPredicate to the UnaryFunction interface.
|
static <L,R> IgnoreRightPredicate<L,R> |
IgnoreRightPredicate.adapt(UnaryPredicate<? super L> predicate)
Adapt a UnaryPredicate as an IgnoreRightPredicate.
|
static <L,R> IgnoreLeftPredicate<L,R> |
IgnoreLeftPredicate.adapt(UnaryPredicate<? super R> predicate)
Adapt a UnaryPredicate to an IgnoreLeftPredicate.
|
static <A> BoundPredicate |
BoundPredicate.bind(UnaryPredicate<? super A> predicate,
A arg)
Adapt the given, possibly-
null,
UnaryPredicate to the
Predicate interface by binding
the specified Object as a constant
argument. |
| Constructor and Description |
|---|
BoundPredicate(UnaryPredicate<? super A> predicate,
A arg)
Create a new BoundPredicate instance.
|
IgnoreLeftPredicate(UnaryPredicate<? super R> predicate)
Create a new IgnoreLeftPredicate.
|
IgnoreRightPredicate(UnaryPredicate<? super L> predicate)
Create a new IgnoreRightPredicate.
|
UnaryPredicateUnaryFunction(UnaryPredicate<? super A> predicate)
Create a new UnaryPredicateUnaryFunction.
|
| Modifier and Type | Class and Description |
|---|---|
class |
Constant<T>
Evaluates to constant value. |
class |
Identity<T>
Evaluates to its input argument. |
class |
IsNotNull<T>
|
class |
IsNull<A>
|
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 | Method and Description |
|---|---|
static <L,R> UnaryPredicate<L> |
IsSame.as(R object)
Get an IsSame UnaryPredicate.
|
static <L,R> UnaryPredicate<L> |
IsNotSame.as(R object)
Get an IsNotSame UnaryPredicate.
|
static <T> UnaryPredicate<T> |
IsInstance.of(Class<?> clazz)
Get an IsInstanceOf UnaryPredicate.
|
static <L,R> UnaryPredicate<L> |
IsNotEqual.to(R object)
Get an IsNotEqual UnaryPredicate.
|
static <L,R> UnaryPredicate<L> |
IsEqual.to(R object)
Get an IsEqual UnaryPredicate.
|
| Modifier and Type | Method and Description |
|---|---|
E |
FindWithinGenerator.evaluate(Generator<? extends E> left,
UnaryPredicate<? super E> right)
Evaluate this function.
|
Number |
IndexOfInGenerator.evaluate(Generator<? extends T> left,
UnaryPredicate<? super T> right)
Evaluate this function.
|
void |
RemoveMatching.run(Iterator<? extends T> left,
UnaryPredicate<? super T> right)
Execute this procedure.
|
void |
RetainMatching.run(Iterator<? extends T> left,
UnaryPredicate<? super T> right)
Execute this procedure.
|
boolean |
GeneratorContains.test(Generator<? extends T> left,
UnaryPredicate<? super T> right)
Evaluate this predicate.
|
| Modifier and Type | Class and Description |
|---|---|
class |
IsEmpty<A> |
| Modifier and Type | Method and Description |
|---|---|
static <A> UnaryPredicate<A> |
IsElementOf.instance(Object obj)
Get an IsElementOf(collection|array) UnaryPredicate.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> Iterator<T> |
FilteredIterator.filter(Iterator<? extends T> iter,
UnaryPredicate<? super T> pred)
Get a filtered Iterator instance applying
pred to iter. |
FilteredIterable<T> |
FilteredIterable.retain(UnaryPredicate<? super T> filter)
Retain only elements matching
predicate. |
| Constructor and Description |
|---|
FilteredIterator(Iterator<? extends T> iterator,
UnaryPredicate<? super T> predicate)
Create a new FilteredIterator.
|
| Modifier and Type | Class and Description |
|---|---|
class |
IsWithinRange<A extends Comparable<A>>
A
UnaryPredicate that tests whether a Comparable object is
within a range. |
| Modifier and Type | Method and Description |
|---|---|
static <T extends Comparable<?>> |
IsEquivalent.instance(T right)
Get an IsEquivalent instance that always compares to
arg. |
static <T extends Comparable<?>> |
IsNotEquivalent.instance(T right)
Get an IsNotEquivalent UnaryPredicate.
|
static <T extends Comparable<?>> |
IsLessThanOrEqual.instance(T right)
Get an IsLessThanOrEqual UnaryPredicate.
|
static <T extends Comparable<?>> |
IsGreaterThan.instance(T right)
Get an IsGreaterThan UnaryPredicate.
|
static <T extends Comparable<?>> |
IsGreaterThanOrEqual.instance(T right)
Get an IsGreaterThanOrEqual UnaryPredicate.
|
static <T extends Comparable<?>> |
IsLessThan.instance(T right)
Get an IsLessThan UnaryPredicate.
|
| Modifier and Type | Class and Description |
|---|---|
class |
CompositeUnaryPredicate<A>
A
UnaryPredicate
representing the composition of
UnaryFunctions,
"chaining" the output of one to the input
of another. |
class |
ConditionalUnaryPredicate<A>
A
UnaryPredicate
similiar to Java's "ternary"
or "conditional" operator (? :). |
class |
UnaryAnd<A>
|
class |
UnaryNot<A>
Tests to the logical inverse
of some other predicate. |
class |
UnaryOr<A>
|
| Modifier and Type | Method and Description |
|---|---|
static <A> UnaryPredicate<A> |
UnaryNot.not(UnaryPredicate<? super A> pred)
Invert a UnaryPredicate.
|
static <A> UnaryPredicate<A> |
Conditional.predicate(UnaryPredicate<? super A> q,
UnaryPredicate<? super A> r,
UnaryPredicate<? super A> s)
Create a conditional UnaryPredicate.
|
| Modifier and Type | Method and Description |
|---|---|
UnaryAnd<A> |
UnaryAnd.and(UnaryPredicate<? super A> p)
Fluently add a UnaryPredicate.
|
static <A,T> UnaryFunction<A,T> |
Conditional.function(UnaryPredicate<? super A> q,
UnaryFunction<? super A,? extends T> r,
UnaryFunction<? super A,? extends T> s)
Create a conditional UnaryFunction.
|
static <A> UnaryPredicate<A> |
UnaryNot.not(UnaryPredicate<? super A> pred)
Invert a UnaryPredicate.
|
UnaryOr<A> |
UnaryOr.or(UnaryPredicate<? super A> p)
Fluently add a Predicate.
|
static <A> CompositeUnaryPredicate<A> |
Composite.predicate(UnaryPredicate<? super A> pred)
Create a composite UnaryPredicate.
|
static <A> UnaryPredicate<A> |
Conditional.predicate(UnaryPredicate<? super A> q,
UnaryPredicate<? super A> r,
UnaryPredicate<? super A> s)
Create a conditional UnaryPredicate.
|
static <A> UnaryPredicate<A> |
Conditional.predicate(UnaryPredicate<? super A> q,
UnaryPredicate<? super A> r,
UnaryPredicate<? super A> s)
Create a conditional UnaryPredicate.
|
static <A> UnaryPredicate<A> |
Conditional.predicate(UnaryPredicate<? super A> q,
UnaryPredicate<? super A> r,
UnaryPredicate<? super A> s)
Create a conditional UnaryPredicate.
|
static <A,T> CompositeUnaryPredicate<A> |
Composite.predicate(UnaryPredicate<? super T> predicate,
UnaryFunction<? super A,? extends T> function)
Create a composite UnaryPredicate.
|
static <A> UnaryProcedure<A> |
Conditional.procedure(UnaryPredicate<? super A> q,
UnaryProcedure<? super A> r)
Create a guarded UnaryProcedure.
|
static <A> UnaryProcedure<A> |
Conditional.procedure(UnaryPredicate<? super A> q,
UnaryProcedure<? super A> r,
UnaryProcedure<? super A> s)
Create a conditional UnaryProcedure.
|
| Constructor and Description |
|---|
CompositeUnaryPredicate(UnaryPredicate<? super A> predicate)
Create a new CompositeUnaryPredicate.
|
ConditionalUnaryFunction(UnaryPredicate<? super A> ifPred,
UnaryFunction<? super A,? extends T> thenFunc,
UnaryFunction<? super A,? extends T> elseFunc)
Create a new ConditionalUnaryFunction.
|
ConditionalUnaryPredicate(UnaryPredicate<? super A> ifPred,
UnaryPredicate<? super A> thenPred,
UnaryPredicate<? super A> elsePred)
Create a new ConditionalUnaryPredicate.
|
ConditionalUnaryPredicate(UnaryPredicate<? super A> ifPred,
UnaryPredicate<? super A> thenPred,
UnaryPredicate<? super A> elsePred)
Create a new ConditionalUnaryPredicate.
|
ConditionalUnaryPredicate(UnaryPredicate<? super A> ifPred,
UnaryPredicate<? super A> thenPred,
UnaryPredicate<? super A> elsePred)
Create a new ConditionalUnaryPredicate.
|
ConditionalUnaryProcedure(UnaryPredicate<? super A> ifPred,
UnaryProcedure<? super A> thenProc)
Create a new ConditionalUnaryProcedure.
|
ConditionalUnaryProcedure(UnaryPredicate<? super A> ifPred,
UnaryProcedure<? super A> thenProc,
UnaryProcedure<? super A> elseProc)
Create a new ConditionalUnaryProcedure.
|
UnaryAnd(UnaryPredicate<? super A>... predicates)
Create a new UnaryAnd instance.
|
UnaryNot(UnaryPredicate<? super A> predicate)
Create a new UnaryNot.
|
UnaryOr(UnaryPredicate<? super A>... predicates)
Create a new UnaryOr instance.
|
| Constructor and Description |
|---|
UnaryAnd(Iterable<UnaryPredicate<? super A>> predicates)
Create a new UnaryAnd instance.
|
UnaryOr(Iterable<UnaryPredicate<? super A>> predicates)
Create a new UnaryOr instance.
|
| Constructor and Description |
|---|
FilteredGenerator(Generator<? extends E> wrapped,
UnaryPredicate<? super E> pred)
Create a new FilteredGenerator.
|
GenerateUntil(Generator<? extends E> wrapped,
UnaryPredicate<? super E> test)
Create a new GenerateUntil.
|
GenerateWhile(Generator<? extends E> wrapped,
UnaryPredicate<? super E> test)
Create a new GenerateWhile.
|
UntilGenerate(UnaryPredicate<? super E> test,
Generator<? extends E> wrapped)
Create a new UntilGenerate.
|
WhileGenerate(UnaryPredicate<? super E> test,
Generator<? extends E> wrapped)
Create a new WhileGenerate.
|
Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.