@FunctionalInterface public interface LongToInt extends LongToIntE<RuntimeException>, LongToIntFunction
(long) -> int.| Modifier and Type | Method and Description |
|---|---|
default int |
applyAsInt(long l)
Allows
this to act as a LongToIntFunction. |
default NilToInt |
bind(long l)
Binds
(l) to this, returning a new function
of type () -> int. |
static NilToInt |
bind(LongToInt f,
long l)
Binds
(l) to f, returning a new function
of type () -> int. |
static <E extends Exception> |
unchecked(Function<? super E,RuntimeException> toRuntime,
LongToIntE<E> f)
Returns a wrapped version of
f that uses toRuntime to convert any checked
Exception to a RuntimeException. |
static <E extends Exception> |
unchecked(LongToIntE<E> f)
Returns a wrapped version of
f that wraps any checked Exception with a
RuntimeException. |
static <E extends IOException> |
uncheckedIO(LongToIntE<E> f)
|
bind, callstatic <E extends Exception> LongToInt unchecked(Function<? super E,RuntimeException> toRuntime, LongToIntE<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
LongToIntE.call(long), 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> LongToInt unchecked(LongToIntE<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> LongToInt uncheckedIO(LongToIntE<E> f)
E - the Exception type that the operation may throwf - the operation to wrapf that throws UncheckedIOException instead of
IOExceptionstatic NilToInt bind(LongToInt f, long l)
(l) to f, returning a new function
of type () -> int.f - the unbound functionl - the argument() -> int that calls
f.call(l) and returns the result.default NilToInt bind(long l)
(l) to this, returning a new function
of type () -> int.bind in interface LongToIntE<RuntimeException>l - the argument() -> int that calls
this.call(l) and returns the result.default int applyAsInt(long l)
this to act as a LongToIntFunction.applyAsInt in interface LongToIntFunctionl - the argumentCopyright © 2015. All rights reserved.