T - the type of the argument@FunctionalInterface public interface ObjToLong<T> extends ObjToLongE<T,RuntimeException>, ToLongFunction<T>
(T) -> long.| Modifier and Type | Method and Description |
|---|---|
default long |
applyAsLong(T t)
Allows
this to act as a ToLongFunction<T>. |
static <T> NilToLong |
bind(ObjToLong<T> f,
T t)
Binds
(t) to f, returning a new function
of type () -> long. |
default NilToLong |
bind(T t)
Binds
(t) to this, returning a new function
of type () -> long. |
static <T,E extends Exception> |
unchecked(Function<? super E,RuntimeException> toRuntime,
ObjToLongE<T,E> f)
Returns a wrapped version of
f that uses toRuntime to convert any checked
Exception to a RuntimeException. |
static <T,E extends Exception> |
unchecked(ObjToLongE<T,E> f)
Returns a wrapped version of
f that wraps any checked Exception with a
RuntimeException. |
static <T,E extends IOException> |
uncheckedIO(ObjToLongE<T,E> f)
|
bind, callstatic <T,E extends Exception> ObjToLong<T> unchecked(Function<? super E,RuntimeException> toRuntime, ObjToLongE<T,E> f)
f that uses toRuntime to convert any checked
Exception to a RuntimeException.T - the type of argument 1E - the Exception type that the operation may throwtoRuntime - if a checked exception is thrown from
ObjToLongE.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,E extends Exception> ObjToLong<T> unchecked(ObjToLongE<T,E> f)
f that wraps any checked Exception with a
RuntimeException.T - the type of argument 1E - the Exception type that the operation may throwf - the operation to wrapf that does not throw checked exceptionsstatic <T,E extends IOException> ObjToLong<T> uncheckedIO(ObjToLongE<T,E> f)
T - the type of argument 1E - the Exception type that the operation may throwf - the operation to wrapf that throws UncheckedIOException instead of
IOExceptionstatic <T> NilToLong bind(ObjToLong<T> f, T t)
(t) to f, returning a new function
of type () -> long.T - the type of the argumentf - the unbound functiont - the argument() -> long that calls
f.call(t) and returns the result.default NilToLong bind(T t)
(t) to this, returning a new function
of type () -> long.bind in interface ObjToLongE<T,RuntimeException>t - the argument() -> long that calls
this.call(t) and returns the result.default long applyAsLong(T t)
this to act as a ToLongFunction<T>.applyAsLong in interface ToLongFunction<T>t - the argumentCopyright © 2015. All rights reserved.