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.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.
|
org.apache.commons.functor.generator.util |
Contains utility code for Generators.
|
Modifier and Type | Class and Description |
---|---|
class |
BinaryFunctionFunction<A,T>
Adapts a BinaryFunction as a Function by sending the same argument to both sides of the BinaryFunction.
|
class |
LeftBoundFunction<A,T>
Adapts a
BinaryFunction
to the
Function interface
using a constant left-side argument. |
class |
NullaryFunctionFunction<A,T>
Adapts a
NullaryFunction
to the
Function interface
by ignoring the unary argument. |
class |
PredicateFunction<A>
|
class |
ProcedureFunction<A,T>
|
class |
RightBoundFunction<A,T>
Adapts a
BinaryFunction
to the
Function interface
using a constant right-side 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.
|
Modifier and Type | Method and Description |
---|---|
static <A> FunctionProcedure<A> |
FunctionProcedure.adapt(Function<? super A,?> function)
|
static <A> FunctionPredicate<A> |
FunctionPredicate.adapt(Function<? super A,Boolean> function)
|
static <L,R,T> IgnoreRightFunction<L,R,T> |
IgnoreRightFunction.adapt(Function<? super L,? extends T> function)
Adapt a Function to the BinaryFunction interface.
|
static <L,R,T> IgnoreLeftFunction<L,R,T> |
IgnoreLeftFunction.adapt(Function<? super R,? extends T> function)
Adapt a Function to the BinaryFunction interface.
|
static <A,T> BoundNullaryFunction<T> |
BoundNullaryFunction.bind(Function<? super A,? extends T> function,
A arg)
Adapt the given, possibly-
null ,
Function to the
NullaryFunction interface by binding
the specified Object as a constant
argument. |
Constructor and Description |
---|
BoundNullaryFunction(Function<? super A,? extends T> function,
A arg)
Create a new BoundNullaryFunction instance.
|
FunctionPredicate(Function<? super A,Boolean> function)
|
FunctionProcedure(Function<? super A,?> function)
|
IgnoreLeftFunction(Function<? super R,? extends T> function)
Create a new IgnoreLeftFunction.
|
IgnoreRightFunction(Function<? super L,? extends T> function)
Create a new IgnoreRightFunction.
|
Constructor and Description |
---|
AbstractListBackedAggregator(Function<List<T>,T> aggregationFunction)
Default constructor.
|
AbstractListBackedAggregator(Function<List<T>,T> aggregationFunction,
long interval)
|
AbstractListBackedAggregator(Function<List<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.
|
ArrayListBackedAggregator(Function<List<T>,T> aggregationFunction)
|
ArrayListBackedAggregator(Function<List<T>,T> aggregationFunction,
long interval)
|
ArrayListBackedAggregator(Function<List<T>,T> aggregationFunction,
long interval,
boolean useSharedTimer)
Initializes an aggregator with the given function, interval and decides
whether to use the shared timer or own timer.
|
Modifier and Type | Class and Description |
---|---|
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 |
DoubleSumAggregatorFunction
Aggregator function to be used with subclasses of
AbstractListBackedAggregator
which sums up all the numbers in the list. |
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 |
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. |
Modifier and Type | Class and Description |
---|---|
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 . |
Modifier and Type | Method and Description |
---|---|
void |
InPlaceTransform.run(ListIterator<T> left,
Function<? super T,? extends T> right)
Execute this procedure.
|
Modifier and Type | Class and Description |
---|---|
class |
Size<A>
Returns the size of the specified Collection, or the length
of the specified array or String.
|
Modifier and Type | Method and Description |
---|---|
static <E> Iterator<?> |
TransformedIterator.maybeTransform(Iterator<? extends E> iter,
Function<? super E,?> func)
Get an Iterator instance that may be transformed.
|
static <E,T> Iterator<T> |
TransformedIterator.transform(Iterator<? extends E> iter,
Function<? super E,? extends T> func)
Get a Transformed Iterator instance.
|
Constructor and Description |
---|
TransformedIterator(Iterator<? extends E> iterator,
Function<? super E,? extends T> function)
Create a new TransformedIterator.
|
Modifier and Type | Method and Description |
---|---|
static <T extends Comparable<?>> |
Min.instance(T right)
Get a Min Function.
|
static <T extends Comparable<?>> |
Max.instance(T right)
Get a Max Function.
|
Modifier and Type | Class and Description |
---|---|
class |
CompositeFunction<A,T>
|
class |
ConditionalFunction<A,T>
A
Function
similiar to Java's "ternary"
or "conditional" operator (? : ). |
Modifier and Type | Method and Description |
---|---|
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.
|
Modifier and Type | Method and Description |
---|---|
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,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 <A,T> CompositeFunction<A,T> |
Composite.function(Function<? super A,? extends T> f)
Create a composite Function.
|
static <A,X,T> CompositeFunction<A,T> |
Composite.function(Function<? super X,? extends T> f,
Function<? super A,? extends X> g)
Create a composite Function.
|
static <A,X,T> CompositeFunction<A,T> |
Composite.function(Function<? super X,? extends T> f,
Function<? super A,? extends X> g)
Create a composite Function.
|
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,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.
|
<P> CompositePredicate<P> |
CompositePredicate.of(Function<? super P,? extends A> preceding)
Fluently obtain a CompositePredicate that applies our predicate to the result of the preceding function.
|
<P> CompositeFunction<P,T> |
CompositeFunction.of(Function<? super P,? extends A> preceding)
Fluently obtain a CompositeFunction that is "this function" applied to the specified preceding function.
|
<T> CompositeProcedure<T> |
CompositeProcedure.of(Function<? super T,? extends A> preceding)
Fluently obtain a CompositeProcedure that runs our procedure against the result of the preceding function.
|
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,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 <A,T> CompositePredicate<A> |
Composite.predicate(Predicate<? super T> predicate,
Function<? super A,? extends T> function)
Create a composite Predicate.
|
static <A,T> CompositeProcedure<A> |
Composite.procedure(Procedure<? super T> procedure,
Function<? super A,? extends T> function)
Create a composite Procedure.
|
Constructor and Description |
---|
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.
|
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.
|
CompositeBinaryPredicate(BinaryPredicate<? super G,? super H> f,
Function<? super L,? extends G> g,
Function<? super R,? extends H> h)
Create a new CompositeBinaryPredicate.
|
CompositeBinaryPredicate(BinaryPredicate<? super G,? super H> f,
Function<? super L,? extends G> g,
Function<? super R,? extends H> h)
Create a new CompositeBinaryPredicate.
|
CompositeFunction(Function<? super A,? extends T> function)
Create a new CompositeFunction.
|
ConditionalFunction(Predicate<? super A> ifPred,
Function<? super A,? extends T> thenFunc,
Function<? super A,? extends T> elseFunc)
Create a new ConditionalFunction.
|
ConditionalFunction(Predicate<? super A> ifPred,
Function<? super A,? extends T> thenFunc,
Function<? super A,? extends T> elseFunc)
Create a new ConditionalFunction.
|
TransformedBinaryFunction(BinaryFunction<? super L,? super R,? extends X> preceding,
Function<? super X,? extends T> following)
Create a new TransformedBinaryFunction.
|
TransformedNullaryFunction(NullaryFunction<? extends X> preceding,
Function<? super X,? extends T> following)
Create a new TransformedNullaryFunction.
|
Modifier and Type | Method and Description |
---|---|
<T> T |
BaseGenerator.to(Function<Generator<? extends E>,? extends T> transformer)
Transforms this generator using the passed in
transformer.
|
<Z> Z |
Generator.to(Function<Generator<? extends E>,? extends Z> transformer)
Transforms this generator using the passed in
transformer.
|
Constructor and Description |
---|
TransformedGenerator(Generator<? extends I> wrapped,
Function<? super I,? extends E> func)
Create a new TransformedGenerator.
|
Modifier and Type | Class and Description |
---|---|
class |
CollectionTransformer<E,C extends Collection<? super E>>
Transforms a generator into a collection.
|
Copyright © 2003–2014 The Apache Software Foundation. All rights reserved.