public abstract class Function<A,B> extends Object
Function.X| Modifier and Type | Class and Description |
|---|---|
static class |
Function.X<A,B>
Version of
Function that allows for throwing a checked exception. |
static class |
Function.Xe<A,B,Err>
Version of
Function that allows for throwing a checked exception. |
| Constructor and Description |
|---|
Function() |
| Modifier and Type | Method and Description |
|---|---|
abstract B |
apply(A a)
Apply function to
a. |
Function<A,Function0<B>> |
curry()
Currying.
|
Function0<B> |
curry(A a)
Currying.
|
<X> Function<A,Either<X,B>> |
either(Function<Exception,X> handler) |
Function<A,B> |
handle(Function<? super Exception,B> handler) |
<C> Function<C,B> |
o(Function<? super C,? extends A> f)
Function composition.
|
Function0<B> |
o(Function0<? extends A> f)
Function composition.
|
Function<A,B> |
rethrow(Function<? super Exception,? extends Exception> transformer) |
<C> Function<A,C> |
then(Function<? super B,? extends C> f)
Left to right composition:
f then g = g(f(x)) |
Effect<A> |
toEffect()
Turn this function into an effect by discarding its result.
|
com.entwinemedia.fn.Fn<A,B> |
toFn() |
com.google.common.base.Function<A,B> |
toGuava()
Convert this function into a google guava function.
|
public <C> Function<C,B> o(Function<? super C,? extends A> f)
g.o(f).apply(x) == g(f(x))public <C> Function<A,C> then(Function<? super B,? extends C> f)
f then g = g(f(x))public Function<A,B> rethrow(Function<? super Exception,? extends Exception> transformer)
Functions.rethrow(Function, Function)public Function<A,B> handle(Function<? super Exception,B> handler)
Functions.handle(Function, Function)public <X> Function<A,Either<X,B>> either(Function<Exception,X> handler)
Functions.either(Function, Function)public com.google.common.base.Function<A,B> toGuava()
Copyright © 2009–2020 Opencast Project. All rights reserved.