|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gicentre.utils.network.traer.physics.Function<From,To>
public abstract class Function<From,To>
Abstraction of functions capable of performing iterated transformations.
Constructor Summary | |
---|---|
Function()
|
Method Summary | ||
---|---|---|
abstract To |
apply(From from)
Should apply the function on the given From value. |
|
|
combine(Function<To,ToNew> other)
|
|
static
|
functor(java.lang.Iterable<From> source,
Function<From,To> sideEffector)
Applies the given sideEffector on the the source. |
|
static
|
transform(java.lang.Iterable<From> source,
Function<From,To> transform)
Transforms the given source using the given function. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Function()
Method Detail |
---|
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
public <ToNew> Function<From,ToNew> combine(Function<To,ToNew> other)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |