@FunctionalInterface public interface IntToInt extends IntToIntE<RuntimeException>, IntUnaryOperator
(int) -> int.| Modifier and Type | Method and Description |
|---|---|
default int |
applyAsInt(int i)
Allows
this to act as a IntUnaryOperator. |
default NilToInt |
bind(int i)
Binds
(i) to this, returning a new function
of type () -> int. |
static NilToInt |
bind(IntToInt f,
int i)
Binds
(i) to f, returning a new function
of type () -> int. |
static <E extends Exception> |
unchecked(Function<? super E,RuntimeException> toRuntime,
IntToIntE<E> f)
Returns a wrapped version of
f that uses toRuntime to convert any checked
Exception to a RuntimeException. |
static <E extends Exception> |
unchecked(IntToIntE<E> f)
Returns a wrapped version of
f that wraps any checked Exception with a
RuntimeException. |
static <E extends IOException> |
uncheckedIO(IntToIntE<E> f)
|
andThen, compose, identitystatic <E extends Exception> IntToInt unchecked(Function<? super E,RuntimeException> toRuntime, IntToIntE<E> f)
f that uses toRuntime to convert any checked
Exception to a RuntimeException.E - the Exception type that the operation may throwtoRuntime - if a checked exception is thrown from
IntToIntE.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 <E extends Exception> IntToInt unchecked(IntToIntE<E> f)
f that wraps any checked Exception with a
RuntimeException.E - the Exception type that the operation may throwf - the operation to wrapf that does not throw checked exceptionsstatic <E extends IOException> IntToInt uncheckedIO(IntToIntE<E> f)
E - the Exception type that the operation may throwf - the operation to wrapf that throws UncheckedIOException instead of
IOExceptionstatic NilToInt bind(IntToInt f, int i)
(i) to f, returning a new function
of type () -> int.f - the unbound functioni - the argument() -> int that calls
f.call(i) and returns the result.default NilToInt bind(int i)
(i) to this, returning a new function
of type () -> int.bind in interface IntToIntE<RuntimeException>i - the argument() -> int that calls
this.call(i) and returns the result.default int applyAsInt(int i)
this to act as a IntUnaryOperator.applyAsInt in interface IntUnaryOperatori - the argumentCopyright © 2015. All rights reserved.