@FunctionalInterface public interface Fn2<A,B,R> extends BiFunction<A,B,R>
Modifier and Type | Interface and Description |
---|---|
static class |
Fn2.Singletons |
Modifier and Type | Method and Description |
---|---|
default R |
apply(A a,
B b)
The class that takes a consumer as an argument uses this convenience method so that it
doesn't have to worry about checked exceptions either.
|
R |
applyEx(A a,
B b)
Implement this one method and you don't have to worry about checked exceptions.
|
static <A1,B1> Fn2<A1,? super B1,A1> |
first()
Returns a static function that always returns the first argument it is given.
|
static <A,B,Z> Fn2<A,B,Z> |
memoize(Fn2<A,B,Z> f)
Use only on pure functions with no side effects.
|
static <A1,B1> Fn2<A1,? super B1,B1> |
second()
Returns a static function that always returns the second argument it is given.
|
andThen
R applyEx(A a, B b) throws Exception
Exception
default R apply(A a, B b)
apply
in interface BiFunction<A,B,R>
static <A,B,Z> Fn2<A,B,Z> memoize(Fn2<A,B,Z> f)
static <A1,B1> Fn2<A1,? super B1,A1> first()
static <A1,B1> Fn2<A1,? super B1,B1> second()
Copyright © 2017. All rights reserved.