From
- Source for transform function.To
- Result of transform function.public abstract class Function<From,To>
extends java.lang.Object
Constructor and Description |
---|
Function() |
Modifier and Type | Method and Description |
---|---|
abstract To |
apply(From from)
Should apply the function on the given From value.
|
<ToNew> Function<From,ToNew> |
combine(Function<To,ToNew> otherFunction)
Combines the given function with this one.
|
static <From,To> void |
functor(java.lang.Iterable<From> source,
Function<From,To> sideEffector)
Applies the given sideEffector on the the source.
|
static <To,From> java.lang.Iterable<To> |
transform(java.lang.Iterable<From> source,
Function<From,To> transform)
Transforms the given source using the given function.
|
public abstract To apply(From from)
from
- From class upon which to apply the function.public static <From,To> void functor(java.lang.Iterable<From> source, Function<From,To> sideEffector)
From
- From typeTo
- To Typesource
- Source upon which to apply the given sideEffector.sideEffector
- SideEffector to apply to the given data.public static <To,From> java.lang.Iterable<To> transform(java.lang.Iterable<From> source, Function<From,To> transform)
To
- To type.From
- From type.source
- Source upon which to apply.transform
- Function to perform the transformation