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