Package | Description |
---|---|
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
Function '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.comparator |
Comparator - and
Comparable -based functors, algorithms and utilities. |
org.apache.commons.functor.core.composite |
Functors composed of other functors.
|
org.apache.commons.functor.range |
Contains code related to Ranges.
|
Modifier and Type | Class and Description |
---|---|
class |
BinaryPredicateBinaryFunction<L,R>
Adapts a
BinaryPredicate
to the
BinaryFunction interface. |
class |
BinaryProcedureBinaryFunction<L,R,T>
|
class |
IgnoreLeftFunction<L,R,T>
Adapts a
Function
to the
BinaryFunction interface
by ignoring the first binary argument. |
class |
IgnoreRightFunction<L,R,T>
Adapts a
Function
to the
BinaryFunction interface
by ignoring the second binary argument. |
Modifier and Type | Method and Description |
---|---|
static <A,T> Function<A,T> |
BinaryFunctionFunction.adapt(BinaryFunction<? super A,? super A,? extends T> function)
Adapt a BinaryFunction as a Function.
|
static <L,R> BinaryFunctionBinaryProcedure<L,R> |
BinaryFunctionBinaryProcedure.adapt(BinaryFunction<? super L,? super R,?> function)
|
static <L,R,T> BinaryFunctionBinaryPredicate<L,R> |
BinaryFunctionBinaryPredicate.adapt(BinaryFunction<? super L,? super R,Boolean> function)
|
static <L,R,T> LeftBoundFunction<R,T> |
LeftBoundFunction.bind(BinaryFunction<? super L,? super R,? extends T> function,
L arg)
Adapt a BinaryFunction as a Function.
|
static <L,R,T> FullyBoundNullaryFunction<T> |
FullyBoundNullaryFunction.bind(BinaryFunction<? super L,? super R,? extends T> function,
L left,
R right)
Adapt a BinaryNullaryFunction as a NullaryFunction.
|
static <L,R,T> RightBoundFunction<L,T> |
RightBoundFunction.bind(BinaryFunction<? super L,? super R,? extends T> function,
R arg)
Adapt a BinaryFunction to the Function interface.
|
Constructor and Description |
---|
BinaryFunctionBinaryPredicate(BinaryFunction<? super L,? super R,Boolean> function)
Create an
BinaryPredicate wrapping the given
BinaryFunction . |
BinaryFunctionBinaryProcedure(BinaryFunction<? super L,? super R,?> function)
Create an
BinaryProcedure wrapping
the given BinaryFunction . |
BinaryFunctionFunction(BinaryFunction<? super A,? super A,? extends T> function)
Create a new BinaryFunctionFunction.
|
FullyBoundNullaryFunction(BinaryFunction<? super L,? super R,? extends T> function,
L left,
R right)
Create a new FullyBoundNullaryFunction.
|
LeftBoundFunction(BinaryFunction<? super L,? super A,? extends T> function,
L arg)
Create a new LeftBoundFunction instance.
|
RightBoundFunction(BinaryFunction<? super A,? super R,? extends T> function,
R arg) |
Constructor and Description |
---|
AbstractNoStoreAggregator(BinaryFunction<T,T,T> aggregationFunction)
|
AbstractNoStoreAggregator(BinaryFunction<T,T,T> aggregationFunction,
long interval)
|
AbstractNoStoreAggregator(BinaryFunction<T,T,T> aggregationFunction,
long interval,
boolean useSharedTimer)
Constructs an aggregator which will use the given function, reset itself
at the given interval and will use a shared timer on own private timer.
|
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 |
DoubleSumAggregatorBinaryFunction
Aggregator function to be used with subclasses of
AbstractNoStoreAggregator which
sums up the 2 given numbers (hence the "Binary" in the name!). |
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 |
IntegerSumAggregatorBinaryFunction
Aggregator function to be used with subclasses of
AbstractNoStoreAggregator which
sums up the 2 given numbers (hence the "Binary" in the name!). |
Modifier and Type | Class and Description |
---|---|
class |
Constant<T>
Evaluates to constant value. |
Modifier and Type | Field and Description |
---|---|
static BinaryFunction<Object,Object,Object> |
RightIdentity.FUNCTION
Right-identity function.
|
static BinaryFunction<Object,Object,Object> |
LeftIdentity.FUNCTION
Left-identity function.
|
Modifier and Type | Method and Description |
---|---|
static <L,R> BinaryFunction<L,R,R> |
RightIdentity.function()
Get a typed right-identity BinaryFunction.
|
static <L,R> BinaryFunction<L,R,L> |
LeftIdentity.function()
Get a Left-identity BinaryFunction.
|
Modifier and Type | Class and Description |
---|---|
class |
FindWithinGenerator<E>
|
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 |
IndexOfInGenerator<T>
Return the index of the first Object in a
LoopGenerator matching a
Predicate , or -1 if not found. |
Constructor and Description |
---|
FoldLeft(BinaryFunction<? super T,? super T,? extends T> func)
Create a new FoldLeft.
|
FoldRight(BinaryFunction<? super T,? super T,? extends T> function)
Create a new FoldRight.
|
Modifier and Type | Class and Description |
---|---|
class |
ComparatorFunction<T>
Adapts a
Comparator to the
BinaryFunction interface. |
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 |
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 |
CompositeBinaryFunction<L,R,T>
A
BinaryFunction composed of
one binary function, f, and two
functions, g and h,
evaluating the ordered parameters x, y
to f(g(x),h(y)) . |
class |
ConditionalBinaryFunction<L,R,T>
A
BinaryFunction
similiar to Java's "ternary"
or "conditional" operator (? : ). |
class |
TransformedBinaryFunction<L,R,T>
A BinaryFunction whose result is then run through a Function.
|
class |
TransposedFunction<L,R,T>
Transposes (swaps) the arguments to some other
function . |
Modifier and Type | Method and Description |
---|---|
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.
|
Modifier and Type | Method and Description |
---|---|
static <L,R,G,H,T> |
Composite.function(BinaryFunction<? super G,? super H,? extends T> f,
BinaryFunction<? super L,? super R,? extends G> g,
BinaryFunction<? super L,? super R,? extends H> h)
Create a composite
|
static <L,R,G,H,T> |
Composite.function(BinaryFunction<? super G,? super H,? extends T> f,
BinaryFunction<? super L,? super R,? extends G> g,
BinaryFunction<? super L,? super R,? extends H> h)
Create a composite
|
static <L,R,G,H,T> |
Composite.function(BinaryFunction<? super G,? super H,? extends T> f,
BinaryFunction<? super L,? super R,? extends G> g,
BinaryFunction<? super L,? super R,? extends H> h)
Create a composite
|
static <L,R,G,H,T> |
Composite.function(BinaryFunction<? super G,? super H,? extends T> f,
Function<? super L,? extends G> g,
Function<? super R,? extends H> h)
Create a composite
|
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,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,T> TransposedFunction<R,L,T> |
TransposedFunction.transpose(BinaryFunction<? super L,? super R,? extends T> f)
Transpose a BinaryFunction.
|
Constructor and Description |
---|
BinaryCompositeBinaryFunction(BinaryFunction<? super G,? super H,? extends T> f,
BinaryFunction<? super L,? super R,? extends G> g,
BinaryFunction<? super L,? super R,? extends H> h)
Create a new BinaryCompositeBinaryFunction.
|
BinaryCompositeBinaryFunction(BinaryFunction<? super G,? super H,? extends T> f,
BinaryFunction<? super L,? super R,? extends G> g,
BinaryFunction<? super L,? super R,? extends H> h)
Create a new BinaryCompositeBinaryFunction.
|
BinaryCompositeBinaryFunction(BinaryFunction<? super G,? super H,? extends T> f,
BinaryFunction<? super L,? super R,? extends G> g,
BinaryFunction<? super L,? super R,? extends H> h)
Create a new BinaryCompositeBinaryFunction.
|
CompositeBinaryFunction(BinaryFunction<? super G,? super H,? extends T> f,
Function<? super L,? extends G> g,
Function<? super R,? extends H> h)
Create a new CompositeBinaryFunction.
|
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.
|
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.
|
TransformedBinaryFunction(BinaryFunction<? super L,? super R,? extends X> preceding,
Function<? super X,? extends T> following)
Create a new TransformedBinaryFunction.
|
TransformedBinaryProcedure(BinaryFunction<? super L,? super R,? extends X> function,
Procedure<? super X> procedure)
Create a new TransformedBinaryProcedure.
|
TransposedFunction(BinaryFunction<? super R,? super L,? extends T> function)
Create a new TransposedFunction.
|
Modifier and Type | Field and Description |
---|---|
static BinaryFunction<Long,Long,Long> |
LongRange.DEFAULT_STEP
Calculate default step.
|
static BinaryFunction<Integer,Integer,Integer> |
IntegerRange.DEFAULT_STEP
Calculate default step.
|
static BinaryFunction<Float,Float,Float> |
FloatRange.DEFAULT_STEP
Calculate default step.
|
static BinaryFunction<Double,Double,Double> |
DoubleRange.DEFAULT_STEP
Calculate default step.
|
static BinaryFunction<Character,Character,Integer> |
CharacterRange.DEFAULT_STEP
Calculate default step.
|
Constructor and Description |
---|
AbstractRange(Endpoint<T> leftEndpoint,
Endpoint<T> rightEndpoint,
S step,
BinaryFunction<T,S,T> nextValue)
Create a new
AbstractRange . |
NumericRange(Endpoint<T> leftEndpoint,
Endpoint<T> rightEndpoint,
T step,
BinaryFunction<T,T,T> nextValue)
Construct a new
NumericRange . |
Copyright © 2003–2014 The Apache Software Foundation. All rights reserved.