| Package | Description |
|---|---|
| org.apache.commons.functor |
Basic functor interfaces.
|
| org.apache.commons.functor.adapter |
Classes that adapt one functor interface to another.
|
| org.apache.commons.functor.aggregator |
This package contains the interfaces and utilities needed to implement
an aggregation service.
|
| org.apache.commons.functor.aggregator.functions |
This package contains
UnaryFunction's used by aggregators
defined in org.apache.commons.functor.aggregator. |
| 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.util |
Contains utility code for Generators.
|
| Modifier and Type | Interface and Description |
|---|---|
interface |
BinaryFunction<L,R,T>
A functor that takes two arguments and returns a value.
|
interface |
BinaryFunctor<L,R>
Marker interface for binary (two-argument) functors.
|
interface |
BinaryPredicate<L,R>
A functor that takes two arguments and returns a
boolean value. |
interface |
BinaryProcedure<L,R>
A functor that takes two arguments and has no return value.
|
interface |
Function<T>
A functor that takes no arguments and returns a value.
|
interface |
NullaryFunctor
Marker interface for nullary (zero-argument) functors.
|
interface |
Predicate
A functor that takes no arguments and returns a
boolean value. |
interface |
Procedure
A functor that takes no arguments and returns no value.
|
interface |
UnaryFunction<A,T>
A functor that takes one argument and returns an
Object value. |
interface |
UnaryFunctor<A>
Marker interface for unary (single-argument) functors.
|
interface |
UnaryPredicate<A>
A functor that takes one argument and returns a
boolean value. |
interface |
UnaryProcedure<A>
A functor that takes one argument and returns no value.
|
| Modifier and Type | Class and Description |
|---|---|
class |
BinaryFunctionBinaryPredicate<L,R>
|
class |
BinaryFunctionBinaryProcedure<L,R>
Adapts a
BinaryFunction
to the BinaryProcedure
interface by ignoring the value returned
by the function. |
class |
BinaryFunctionUnaryFunction<A,T>
Adapts a BinaryFunction as a UnaryFunction by sending the same argument to both sides of the BinaryFunction.
|
class |
BinaryPredicateBinaryFunction<L,R>
Adapts a
BinaryPredicate
to the
BinaryFunction interface. |
class |
BinaryPredicateUnaryPredicate<A>
Adapts a BinaryPredicate as a UnaryPredicate by sending the same argument to both sides of the BinaryPredicate.
|
class |
BinaryProcedureBinaryFunction<L,R,T>
|
class |
BinaryProcedureUnaryProcedure<A>
Adapts a BinaryProcedure as a UnaryProcedure by sending the same argument to both sides of the BinaryProcedure.
|
class |
BoundFunction<T>
Adapts a
UnaryFunction
to the
Function interface
using a constant unary argument. |
class |
BoundPredicate
Adapts a
UnaryPredicate
to the
Predicate interface
using a constant unary argument. |
class |
BoundProcedure
Adapts a
UnaryProcedure
to the
Procedure interface
using a constant unary argument. |
class |
FullyBoundFunction<T>
Adapts a
BinaryFunction
to the
Function interface
using constant arguments. |
class |
FullyBoundPredicate
Adapts a
BinaryPredicate
to the
UnaryPredicate interface
using a constant left-side argument. |
class |
FullyBoundProcedure
Adapts a
BinaryProcedure
to the
Procedure interface
using a constant left-side argument. |
class |
FunctionPredicate
|
class |
FunctionProcedure
|
class |
FunctionUnaryFunction<A,T>
Adapts a
Function
to the
UnaryFunction interface
by ignoring the unary argument. |
class |
IgnoreLeftFunction<L,R,T>
Adapts a
UnaryFunction
to the
BinaryFunction interface
by ignoring the first binary argument. |
class |
IgnoreLeftPredicate<L,R>
Adapts a
UnaryPredicate
to the
BinaryPredicate interface
by ignoring the first binary argument. |
class |
IgnoreLeftProcedure<L,R>
Adapts a
UnaryProcedure
to the
BinaryProcedure interface
by ignoring the first binary argument. |
class |
IgnoreRightFunction<L,R,T>
Adapts a
UnaryFunction
to the
BinaryFunction interface
by ignoring the second binary argument. |
class |
IgnoreRightPredicate<L,R>
Adapts a
UnaryPredicate
to the
BinaryPredicate interface
by ignoring the second binary argument. |
class |
IgnoreRightProcedure<L,R>
Adapts a
UnaryProcedure
to the
BinaryProcedure interface
by ignoring the second binary argument. |
class |
LeftBoundFunction<A,T>
Adapts a
BinaryFunction
to the
UnaryFunction interface
using a constant left-side argument. |
class |
LeftBoundPredicate<A>
Adapts a
BinaryPredicate
to the
UnaryPredicate interface
using a constant left-side argument. |
class |
LeftBoundProcedure<A>
Adapts a
BinaryProcedure
to the
UnaryProcedure interface
using a constant left-side argument. |
class |
PredicateFunction
|
class |
PredicateUnaryPredicate<A>
Adapts a
Predicate
to the
UnaryPredicate interface
by ignoring the given argument. |
class |
ProcedureFunction<T>
|
class |
ProcedureUnaryProcedure<A>
Adapts a
Procedure
to the
UnaryProcedure interface
by ignoring the arguments. |
class |
RightBoundFunction<A,T>
Adapts a
BinaryFunction
to the
UnaryFunction interface
using a constant right-side argument. |
class |
RightBoundPredicate<A>
Adapts a
BinaryPredicate
to the
UnaryPredicate interface
using a constant left-side argument. |
class |
RightBoundProcedure<A>
Adapts a
BinaryProcedure
to the
UnaryProcedure interface
using a constant left-side argument. |
class |
UnaryFunctionUnaryPredicate<A>
|
class |
UnaryFunctionUnaryProcedure<A>
Adapts a
UnaryFunction
to the UnaryProcedure
interface by ignoring the value returned
by the function. |
class |
UnaryPredicateUnaryFunction<A>
Adapts a
UnaryPredicate
to the
UnaryFunction interface. |
class |
UnaryProcedureUnaryFunction<A,T>
|
| Modifier and Type | Interface and Description |
|---|---|
interface |
Aggregator<T>
Interface which offers a means of "aggregating" data.
|
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractListBackedAggregator<T>
An aggregator which stores the data series in a List.
|
class |
AbstractNoStoreAggregator<T>
An implementation of an aggregator which doesn't store the data series but
instead it processes the data on the fly, as it arrives in
AbstractTimedAggregator.add(Object) and stores the result after each addition. |
class |
AbstractTimedAggregator<T>
An aggregator which automatically resets the aggregated data at regular
intervals and sends a notification when it is about to do so, so listeners
can decide to gather the information before it is being reset (and log it
etc).
|
class |
ArrayListBackedAggregator<T>
Implementation of an aggregator which stores the data series in an
ArrayList. |
| Modifier and Type | Class and Description |
|---|---|
class |
DoubleMaxAggregatorBinaryFunction
Aggregation function to be used with subclasses of
AbstractNoStoreAggregator which
finds the maximum of 2 double(s). |
class |
DoubleMaxAggregatorFunction
Aggregator function to be used with subclasses of
AbstractListBackedAggregator
which finds the maximum number in a list. |
class |
DoubleMeanValueAggregatorFunction
Aggregator function to be used with subclasses of
AbstractListBackedAggregator
which computes the arithmetic mean of all the numbers in the list. |
class |
DoubleMedianValueAggregatorFunction
Aggregator function to be used with subclasses of
AbstractListBackedAggregator
which computes the median
of all the numbers in the list. |
class |
DoublePercentileAggregatorFunction
Aggregator function to be used with subclasses of
AbstractListBackedAggregator
which retrieves the percentile value for a
given percentile. |
class |
DoubleSumAggregatorBinaryFunction
Aggregator function to be used with subclasses of
AbstractNoStoreAggregator which
sums up the 2 given numbers (hence the "Binary" in the name!). |
class |
DoubleSumAggregatorFunction
Aggregator function to be used with subclasses of
AbstractListBackedAggregator
which sums up all the numbers in the list. |
class |
IntegerCountAggregatorBinaryFunction
Aggregator function to be used with subclasses of
AbstractNoStoreAggregator which
simply increments the first argument by 1 and returns it. |
class |
IntegerMaxAggregatorBinaryFunction
Aggregation function to be used with subclasses of
AbstractNoStoreAggregator which
finds the maximum of 2 ints. |
class |
IntegerMaxAggregatorFunction
Aggregator function to be used with subclasses of
AbstractListBackedAggregator
which finds the maximum number in a list. |
class |
IntegerMeanValueAggregatorFunction
Aggregator function to be used with subclasses of
AbstractListBackedAggregator
which computes the arithmetic mean of all the numbers in the list. |
class |
IntegerMedianValueAggregatorFunction
Aggregator function to be used with subclasses of
AbstractListBackedAggregator
which computes the median
of all the numbers in the list. |
class |
IntegerPercentileAggregatorFunction
Aggregator function to be used with subclasses of
AbstractListBackedAggregator
which retrieves the percentile value for a
given percentile. |
class |
IntegerSumAggregatorBinaryFunction
Aggregator function to be used with subclasses of
AbstractNoStoreAggregator which
sums up the 2 given numbers (hence the "Binary" in the name!). |
class |
IntegerSumAggregatorFunction
Aggregator function to be used with subclasses of
AbstractListBackedAggregator
which sums up all the numbers in the list. |
| Modifier and Type | Class and Description |
|---|---|
class |
Constant<T>
Evaluates to constant value. |
class |
Identity<T>
Evaluates to its input argument. |
class |
IsEqual<L,R>
|
class |
IsInstance<T>
|
class |
IsNotEqual<L,R>
|
class |
IsNotNull<T>
|
class |
IsNotSame<L,R>
Tests the reference (!=) inequality of its arguments. |
class |
IsNull<A>
|
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 |
NoOp
A procedure that does nothing at all.
|
class |
Offset
A predicate that returns
false
the first n times it is invoked, and
true thereafter. |
| Modifier and Type | Class and Description |
|---|---|
class |
DoUntil
Do-until algorithm (test after).
|
class |
DoWhile
Do-while algorithm (test after).
|
class |
FindWithinGenerator<E>
Return the first Object in a
Generator matching a UnaryPredicate. |
class |
FoldLeft<T>
Functional left-fold algorithm against the elements of a
Generator. |
class |
FoldRight<T>
Functional right-fold algorithm against the elements of a
Generator. |
class |
GeneratorContains<T>
Tests whether a
Generator contains an element that matches a UnaryPredicate. |
class |
IndexOfInGenerator<T>
Return the index of the first Object in a
Generator matching a UnaryPredicate, or -1 if not found. |
class |
InPlaceTransform<T>
Implements an in-place transformation of a ListIterator's contents.
|
class |
RecursiveEvaluation
Tail recursion for
functions. |
class |
RemoveMatching<T>
Remove elements from left Iterator that match right UnaryPredicate.
|
class |
RetainMatching<T>
Retain elements in left Iterator that match right UnaryPredicate.
|
class |
UntilDo
Until-do algorithm (test before).
|
class |
WhileDo
While-do algorithm (test before).
|
| 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. |
class |
IsEmpty<A> |
class |
Size<A>
Returns the size of the specified Collection, or the length
of the specified array or String.
|
| Modifier and Type | Class and Description |
|---|---|
class |
ComparatorFunction<T>
Adapts a
Comparator to the
BinaryFunction interface. |
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. |
class |
IsWithinRange<A extends Comparable<A>>
A
UnaryPredicate that tests whether a Comparable object is
within a range. |
class |
Max<T>
Adapts a
Comparator to the
BinaryFunction interface. |
class |
Min<T>
Adapts a
Comparator to the
BinaryFunction interface. |
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractLoopProcedure
Abstract base class for
WhileDoProcedure and DoWhileProcedure
used to implement loop procedures. |
class |
And
|
class |
BinaryAnd<L,R>
|
class |
BinaryCompositeBinaryFunction<L,R,T>
A
BinaryFunction composed of
three binary functions, f, g and h,
evaluating the ordered parameters x, y
to f(g(x,y),h(x,y)). |
class |
BinaryNot<L,R>
Tests to the logical inverse
of some other predicate. |
class |
BinaryOr<L,R>
|
class |
BinarySequence<L,R>
|
class |
CompositeUnaryFunction<A,T>
A
UnaryFunction
representing the composition of
UnaryFunctions,
"chaining" the output of one to the input
of another. |
class |
CompositeUnaryPredicate<A>
A
UnaryPredicate
representing the composition of
UnaryFunctions,
"chaining" the output of one to the input
of another. |
class |
CompositeUnaryProcedure<A>
A
UnaryProcedure
representing the composition of
UnaryFunctions,
"chaining" the output of one to the input
of another. |
class |
ConditionalBinaryFunction<L,R,T>
A
BinaryFunction
similiar to Java's "ternary"
or "conditional" operator (? :). |
class |
ConditionalBinaryPredicate<L,R>
A
BinaryPredicate
similiar to Java's "ternary"
or "conditional" operator (? :). |
class |
ConditionalBinaryProcedure<L,R>
A
BinaryProcedure
similiar to Java's "ternary"
or "conditional" operator (? :). |
class |
ConditionalFunction<T>
A
Function
similiar to Java's "ternary"
or "conditional" operator (? :). |
class |
ConditionalPredicate
A
Predicate
similiar to Java's "ternary"
or "conditional" operator (? :). |
class |
ConditionalProcedure
A
Procedure
similiar to Java's "ternary"
or "conditional" operator (? :). |
class |
ConditionalUnaryFunction<A,T>
A
UnaryFunction
similiar to Java's "ternary"
or "conditional" operator (? :). |
class |
ConditionalUnaryPredicate<A>
A
UnaryPredicate
similiar to Java's "ternary"
or "conditional" operator (? :). |
class |
ConditionalUnaryProcedure<A>
A
UnaryProcedure
similiar to Java's "ternary"
or "conditional" operator (? :). |
class |
DoWhileProcedure
A
Procedure implementation of a while loop. |
class |
Not
Tests to the logical inverse
of some other predicate. |
class |
Or
|
class |
Sequence
|
class |
TransformedBinaryFunction<L,R,T>
A BinaryFunction whose result is then run through a UnaryFunction.
|
class |
TransformedBinaryProcedure<L,R>
A BinaryProcedure composed of a BinaryFunction whose result is then run through a UnaryProcedure.
|
class |
TransformedFunction<T>
A Function whose result is then run through a UnaryFunction.
|
class |
TransformedProcedure
A Procedure composed of a Function whose result is then run through a UnaryProcedure.
|
class |
TransposedFunction<L,R,T>
Transposes (swaps) the arguments to some other
function. |
class |
TransposedPredicate<L,R>
Transposes (swaps) the arguments to some other
predicate. |
class |
TransposedProcedure<L,R>
Transposes (swaps) the arguments to some other
procedure. |
class |
UnaryAnd<A>
|
class |
UnaryCompositeBinaryFunction<L,R,T>
A
BinaryFunction composed of
one binary function, f, and two unary
functions, g and h,
evaluating the ordered parameters x, y
to f(g(x),h(y)). |
class |
UnaryCompositeBinaryPredicate<L,R>
A
BinaryPredicate composed of
one binary predicate, p, and two unary
functions, f and g,
evaluating the ordered parameters x, y
to p(f(x),g(y)). |
class |
UnaryNot<A>
Tests to the logical inverse
of some other predicate. |
class |
UnaryOr<A>
|
class |
UnarySequence<A>
|
class |
WhileDoProcedure
A
Procedure implementation of a while loop. |
| Modifier and Type | Class and Description |
|---|---|
class |
CollectionTransformer<E,C extends Collection<? super E>>
Transforms a generator into a collection.
|
Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.