See: Description
Interface | Description |
---|---|
Consumer<T> |
A special type of function which does not return anything.
|
Equality<T> |
A comparator to be used for element equality as well as for
ordering.
|
Function<T,R> |
A function that perform some operation and returns the result of
that operation.
|
Iteration<E> |
A function iterating over a collection.
|
Iteration.Mutable<E> | |
Iteration.Sequential<E> | |
Predicate<T> |
A function which states or affirms the attribute or quality of something.
|
Reducer<E> |
An operator upon multiple elements of a collection yielding a result
of that collection type.
|
Splittable<T> |
An object which can be divided in distinct parts and on which the same
action may be performed on its part rather than its whole.
|
Supplier<T> |
A function which does not take any argument and returns instances
of a particular class.
|
Class | Description |
---|---|
Equalities |
A set of useful equalities comparators.
|
MultiVariable<L,R> |
An object holding multiple variables; typically used to create
multi-parameters functions . |
Reducers |
A set of useful
reducers of collection elements. |
Basic functions for lambda expressions and method references.
Most often, functions do not have a state and can be called concurrently, as indicated by the annotationParallelizable
.
Functions may take an arbitrary number of arguments through the use of
multi-variables
or no argument at all using the standard Void
class.
// Function populating a list of integer and returning void. Function<MultiVariable<List<Integer>, Integer>, Void> fill = new Function<>() { public Void apply(MultiVariable<List<Integer>, Integer> params) { List<Integer> list = params.getLeft(); for (int i = 0, n = params.getRight(); i < n; i++) { list.add(i); } return null; } }; FastTable<Integer> list = new FastTable<Integer>(); fill.apply(new MultiVariable(list, 100)); // Populates with numbers [0 .. 100[
Copyright © 2005-2013 Javolution. All Rights Reserved.