|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuk.co.jezuk.mango.Bind
public class Bind
The Mango Library Function Binders
Function and Predicate binding adaptors.
| Method Summary | ||
|---|---|---|
static
|
First(BinaryFunction<T1,T2,R> f,
T1 c)
Adapts a BinaryFunction into a Function. |
|
static
|
First(BinaryPredicate<T1,T2> p,
T1 c)
Special case which adapts a BinaryPredicate to a Predicate. |
|
static
|
Second(BinaryFunction<T1,T2,R> f,
T2 c)
Adapts a BinaryFunction into a Function. |
|
static
|
Second(BinaryPredicate<T1,T2> p,
T2 c)
Special case which adapts a BinaryPredicate to a Predicate. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <T1,T2,R> Function<T2,R> First(BinaryFunction<T1,T2,R> f,
T1 c)
BinaryFunction into a Function.
If f is an object implementing BinaryFunction, then
Bind.First(f, C).fn(arg) returns f(C, arg).
Intuitively, you can think of this as "binding" the first argument of a
BinaryFunction to a constant, thus giving a Function.
public static <T1,T2> Predicate<T2> First(BinaryPredicate<T1,T2> p,
T1 c)
BinaryPredicate to a Predicate.
If p is a BinaryPredicate, then Bind.First(p, C).test(arg)
returns p.test(C, arg).
public static <T1,T2,R> Function<T1,R> Second(BinaryFunction<T1,T2,R> f,
T2 c)
BinaryFunction into a Function.
If f is an object implementing BinaryFunction, then
Bind.Second(f, C).fn(arg) returns f(arg, C).
Intuitively, you can think of this as "binding" the second argument of a
BinaryFunction to a constant, thus giving a Function.
public static <T1,T2> Predicate<T1> Second(BinaryPredicate<T1,T2> p,
T2 c)
BinaryPredicate to a Predicate.
If p is a BinaryPredicate, then Bind.Second(p, C).test(arg)
returns p.test(arg, C).
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||