|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuk.co.jezuk.mango.Functions
public class Functions
The Mango Library Unary Functions
A describes a function which takes one argument
- Functionfn(x). It returns some T and returns and
object of type R. T and R may be the same time). A
Function may return the same object or different objects
for each invocation, even given the same argument. It can refer to
local state, perform disk reads or writes, or whatever.
Function,
Predicates| Constructor Summary | |
|---|---|
Functions()
|
|
| Method Summary | ||
|---|---|---|
static
|
Compose(Function<T2,R> f,
Function<T,T2> g)
Compose is a unary function adaptor. |
|
static
|
Constant(R value)
Returns the initial value, regardless of the argument passed to the function |
|
static
|
Identity()
The identity function. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Functions()
| Method Detail |
|---|
public static <T,T2,R> Function<T,R> Compose(Function<T2,R> f,
Function<T,T2> g)
f and g
are Functions, then Compose creates a new
function h, where h(x) is equal to f(g(x)).
public static <T> Function<T,T> Identity()
public static <T,R> Function<T,R> Constant(R value)
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||