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.
|
org.apache.commons.functor.generator.loop |
Contains code related to Generators that control execution flow.
|
Modifier and Type | Class and Description |
---|---|
class |
BinaryPredicatePredicate<A>
Adapts a BinaryPredicate as a Predicate by sending the same argument to both sides of the BinaryPredicate.
|
class |
FunctionPredicate<A>
|
class |
LeftBoundPredicate<A>
Adapts a
BinaryPredicate
to the
Predicate interface
using a constant left-side argument. |
class |
NullaryPredicatePredicate<A>
Adapts a
NullaryPredicate
to the
Predicate interface
by ignoring the given argument. |
class |
RightBoundPredicate<A>
Adapts a
BinaryPredicate
to the
Predicate interface
using a constant left-side 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.
|
Modifier and Type | Method and Description |
---|---|
static <A> PredicateFunction<A> |
PredicateFunction.adapt(Predicate<? super A> predicate)
Adapt a Predicate to the Function interface.
|
static <L,R> IgnoreRightPredicate<L,R> |
IgnoreRightPredicate.adapt(Predicate<? super L> predicate)
Adapt a Predicate as an IgnoreRightPredicate.
|
static <L,R> IgnoreLeftPredicate<L,R> |
IgnoreLeftPredicate.adapt(Predicate<? super R> predicate)
Adapt a Predicate to an IgnoreLeftPredicate.
|
static <A> BoundNullaryPredicate |
BoundNullaryPredicate.bind(Predicate<? super A> predicate,
A arg)
Adapt the given, possibly-
null ,
Predicate to the
NullaryPredicate interface by binding
the specified Object as a constant
argument. |
Constructor and Description |
---|
BoundNullaryPredicate(Predicate<? super A> predicate,
A arg)
Create a new BoundNullaryPredicate instance.
|
IgnoreLeftPredicate(Predicate<? super R> predicate)
Create a new IgnoreLeftPredicate.
|
IgnoreRightPredicate(Predicate<? super L> predicate)
Create a new IgnoreRightPredicate.
|
PredicateFunction(Predicate<? super A> predicate)
Create a new PredicateFunction.
|
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> Predicate<L> |
IsSame.as(R object)
Get an IsSame Predicate.
|
static <L,R> Predicate<L> |
IsNotSame.as(R object)
Get an IsNotSame Predicate.
|
static <T> Predicate<T> |
IsInstance.of(Class<?> clazz)
Get an IsInstanceOf Predicate.
|
static <L,R> Predicate<L> |
IsNotEqual.to(R object)
Get an IsNotEqual Predicate.
|
static <L,R> Predicate<L> |
IsEqual.to(R object)
Get an IsEqual Predicate.
|
Modifier and Type | Method and Description |
---|---|
E |
FindWithinGenerator.evaluate(Generator<? extends E> left,
Predicate<? super E> right)
Evaluate this function.
|
Number |
IndexOfInGenerator.evaluate(LoopGenerator<? extends T> left,
Predicate<? super T> right)
Evaluate this function.
|
void |
RetainMatching.run(Iterator<? extends T> left,
Predicate<? super T> right)
Execute this procedure.
|
void |
RemoveMatching.run(Iterator<? extends T> left,
Predicate<? super T> right)
Execute this procedure.
|
boolean |
GeneratorContains.test(Generator<? extends T> left,
Predicate<? super T> right)
Evaluate this predicate.
|
Modifier and Type | Class and Description |
---|---|
class |
IsEmpty<A>
A
Predicate that checks to see if the specified object is empty. |
Modifier and Type | Method and Description |
---|---|
static <A> Predicate<A> |
IsElementOf.instance(Object obj)
Get an IsElementOf(collection|array) Predicate.
|
Modifier and Type | Method and Description |
---|---|
static <T> Iterator<T> |
FilteredIterator.filter(Iterator<? extends T> iter,
Predicate<? super T> pred)
Get a filtered Iterator instance applying
pred to iter . |
FilteredIterable<T> |
FilteredIterable.retain(Predicate<? super T> filter)
Retain only elements matching
predicate . |
Constructor and Description |
---|
FilteredIterator(Iterator<? extends T> iterator,
Predicate<? super T> predicate)
Create a new FilteredIterator.
|
Modifier and Type | Class and Description |
---|---|
class |
IsWithinRange<A extends Comparable<A>>
A
Predicate that tests whether a Comparable object is
within a range. |
Modifier and Type | Method and Description |
---|---|
static <T extends Comparable<?>> |
IsNotEquivalent.instance(T right)
Get an IsNotEquivalent Predicate.
|
static <T extends Comparable<?>> |
IsLessThanOrEqual.instance(T right)
Get an IsLessThanOrEqual Predicate.
|
static <T extends Comparable<?>> |
IsLessThan.instance(T right)
Get an IsLessThan Predicate.
|
static <T extends Comparable<?>> |
IsGreaterThanOrEqual.instance(T right)
Get an IsGreaterThanOrEqual Predicate.
|
static <T extends Comparable<?>> |
IsGreaterThan.instance(T right)
Get an IsGreaterThan Predicate.
|
static <T extends Comparable<?>> |
IsEquivalent.instance(T right)
Get an IsEquivalent instance that always compares to
arg . |
Modifier and Type | Class and Description |
---|---|
class |
And<A>
|
class |
CompositePredicate<A>
|
class |
ConditionalPredicate<A>
A
Predicate
similiar to Java's "ternary"
or "conditional" operator (? : ). |
class |
Not<A>
Tests to the logical inverse
of some other predicate. |
class |
Or<A>
|
Modifier and Type | Method and Description |
---|---|
static <A> Predicate<A> |
Not.not(Predicate<? super A> pred)
Invert a Predicate.
|
static <A> Predicate<A> |
Conditional.predicate(Predicate<? super A> q,
Predicate<? super A> r,
Predicate<? super A> s)
Create a conditional Predicate.
|
Modifier and Type | Method and Description |
---|---|
And<A> |
And.and(Predicate<? super A> p)
Fluently add a Predicate.
|
static <A,T> Function<A,T> |
Conditional.function(Predicate<? super A> q,
Function<? super A,? extends T> r,
Function<? super A,? extends T> s)
Create a conditional Function.
|
static <A> Predicate<A> |
Not.not(Predicate<? super A> pred)
Invert a Predicate.
|
Or<A> |
Or.or(Predicate<? super A> p)
Fluently add a Predicate.
|
static <A> CompositePredicate<A> |
Composite.predicate(Predicate<? super A> pred)
Create a composite Predicate.
|
static <A> Predicate<A> |
Conditional.predicate(Predicate<? super A> q,
Predicate<? super A> r,
Predicate<? super A> s)
Create a conditional Predicate.
|
static <A> Predicate<A> |
Conditional.predicate(Predicate<? super A> q,
Predicate<? super A> r,
Predicate<? super A> s)
Create a conditional Predicate.
|
static <A> Predicate<A> |
Conditional.predicate(Predicate<? super A> q,
Predicate<? super A> r,
Predicate<? super A> s)
Create a conditional Predicate.
|
static <A,T> CompositePredicate<A> |
Composite.predicate(Predicate<? super T> predicate,
Function<? super A,? extends T> function)
Create a composite Predicate.
|
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.
|
Constructor and Description |
---|
And(Predicate<? super A>... predicates)
Create a new And instance.
|
CompositePredicate(Predicate<? super A> predicate)
Create a new CompositePredicate.
|
ConditionalFunction(Predicate<? super A> ifPred,
Function<? super A,? extends T> thenFunc,
Function<? super A,? extends T> elseFunc)
Create a new ConditionalFunction.
|
ConditionalPredicate(Predicate<? super A> ifPred,
Predicate<? super A> thenPred,
Predicate<? super A> elsePred)
Create a new ConditionalPredicate.
|
ConditionalPredicate(Predicate<? super A> ifPred,
Predicate<? super A> thenPred,
Predicate<? super A> elsePred)
Create a new ConditionalPredicate.
|
ConditionalPredicate(Predicate<? super A> ifPred,
Predicate<? super A> thenPred,
Predicate<? super A> elsePred)
Create a new ConditionalPredicate.
|
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.
|
Not(Predicate<? super A> predicate)
Create a new Not.
|
Or(Predicate<? super A>... predicates)
Create a new Or instance.
|
Constructor and Description |
---|
And(Iterable<Predicate<? super A>> predicates)
Create a new And instance.
|
Or(Iterable<Predicate<? super A>> predicates)
Create a new Or instance.
|
Constructor and Description |
---|
FilteredGenerator(Generator<? extends E> wrapped,
Predicate<? super E> pred)
Create a new FilteredGenerator.
|
Constructor and Description |
---|
GenerateUntil(Generator<? extends E> wrapped,
Predicate<? super E> test)
Create a new GenerateUntil.
|
GenerateWhile(Generator<? extends E> wrapped,
Predicate<? super E> test)
Create a new GenerateWhile.
|
UntilGenerate(Predicate<? super E> test,
Generator<? extends E> wrapped)
Create a new UntilGenerate.
|
WhileGenerate(Predicate<? super E> test,
Generator<? extends E> wrapped)
Create a new WhileGenerate.
|
Copyright © 2003–2014 The Apache Software Foundation. All rights reserved.