T - the type of argument 1R - the type of the return value@FunctionalInterface public interface ObjToObj<T,R> extends ObjToObjE<T,R,RuntimeException>, Function<T,R>
(T) -> R.| Modifier and Type | Method and Description |
|---|---|
default R |
apply(T t)
Allows
this to act as a Function<T, R>. |
static <T,R> NilToObj<R> |
bind(ObjToObj<T,R> f,
T t)
Binds
(t) to f, returning a new function
of type () -> R. |
default NilToObj<R> |
bind(T t)
Binds
(t) to this, returning a new function
of type () -> R. |
static <T,R,E extends Exception> |
unchecked(Function<? super E,RuntimeException> toRuntime,
ObjToObjE<T,R,E> f)
Returns a wrapped version of
f that uses toRuntime to convert any checked
Exception to a RuntimeException. |
static <T,R,E extends Exception> |
unchecked(ObjToObjE<T,R,E> f)
Returns a wrapped version of
f that wraps any checked Exception with a
RuntimeException. |
static <T,R,E extends IOException> |
uncheckedIO(ObjToObjE<T,R,E> f)
|
static <T,R,E extends Exception> ObjToObj<T,R> unchecked(Function<? super E,RuntimeException> toRuntime, ObjToObjE<T,R,E> f)
f that uses toRuntime to convert any checked
Exception to a RuntimeException.T - the type of argument 1R - the type of the return valueE - the Exception type that the operation may throwtoRuntime - if a checked exception is thrown from
ObjToObjE.call(T), then this function
is called in in order to convert it to a RuntimeExceptionf - the operation to wrapf that does not throw checked exceptionsstatic <T,R,E extends Exception> ObjToObj<T,R> unchecked(ObjToObjE<T,R,E> f)
f that wraps any checked Exception with a
RuntimeException.T - the type of argument 1R - the type of the return valueE - the Exception type that the operation may throwf - the operation to wrapf that does not throw checked exceptionsstatic <T,R,E extends IOException> ObjToObj<T,R> uncheckedIO(ObjToObjE<T,R,E> f)
T - the type of argument 1R - the type of the return valueE - the Exception type that the operation may throwf - the operation to wrapf that throws UncheckedIOException instead of
IOExceptionstatic <T,R> NilToObj<R> bind(ObjToObj<T,R> f, T t)
(t) to f, returning a new function
of type () -> R.T - the type of argument 1R - the type of the return valuef - the unbound functiont - the argument() -> R that calls
f.call(t) and returns the result.default NilToObj<R> bind(T t)
(t) to this, returning a new function
of type () -> R.bind in interface ObjToObjE<T,R,RuntimeException>t - the argument() -> R that calls
this.call(t) and returns the result.Copyright © 2015. All rights reserved.