See: Description
Interface | Description |
---|---|
CollectionOperator<E> |
An operator upon multiple elements of a collection yielding a result
of that collection type.
|
Consumer<T> |
A special type of function which does not return anything.
|
EqualityComparator<T> |
A coherent comparator to be used for equality as well as for
ordering.
|
Function<T,R> |
A function that perform some operation and returns the result of
that operation.
|
Predicate<T> |
A function which states or affirms the attribute or quality of something.
|
Supplier<T> |
A function which does not take any argument and returns instances
of a particular class.
|
Class | Description |
---|---|
Comparators |
A set of useful
comparators
for equality and ordering. |
MultiVariable<L,R> |
An object holding multiple variables; typically used to create
multi-parameters functions . |
Operators |
A set of useful
operators over collections. |
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.