javolution.util.function.package-info Maven / Gradle / Ivy
Show all versions of javolution-core-java-msftbx
/**
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 annotation {@link javolution.lang.Parallelizable Parallelizable}.
Functions may take an arbitrary number of arguments through the use of
{@link javolution.util.function.MultiVariable multi-variables}
or no argument at all using the standard {@link java.lang.Void} class.
[code]
// Function populating a list of integer and returning void.
Function, Integer>, Void> fill = new Function<>() {
public Void apply(MultiVariable, Integer> params) {
List list = params.getLeft();
for (int i = 0, n = params.getRight(); i < n; i++) {
list.add(i);
}
return null;
}
};
FastTable list = new FastTable();
fill.apply(new MultiVariable(list, 100)); // Populates with numbers [0 .. 100[
[/code]
*/
package javolution.util.function;