T - the type of the argument@FunctionalInterface public interface ObjToDbl<T> extends ObjToDblE<T,RuntimeException>, ToDoubleFunction<T>
(T) -> double.| Modifier and Type | Method and Description |
|---|---|
default double |
applyAsDouble(T t)
Allows
this to act as a ToDoubleFunction<T>. |
static <T> NilToDbl |
bind(ObjToDbl<T> f,
T t)
Binds
(t) to f, returning a new function
of type () -> double. |
default NilToDbl |
bind(T t)
Binds
(t) to this, returning a new function
of type () -> double. |
static <T,E extends Exception> |
unchecked(Function<? super E,RuntimeException> toRuntime,
ObjToDblE<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(ObjToDblE<T,E> f)
Returns a wrapped version of
f that wraps any checked Exception with a
RuntimeException. |
static <T,E extends IOException> |
uncheckedIO(ObjToDblE<T,E> f)
|
static <T,E extends Exception> ObjToDbl<T> unchecked(Function<? super E,RuntimeException> toRuntime, ObjToDblE<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
ObjToDblE.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> ObjToDbl<T> unchecked(ObjToDblE<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> ObjToDbl<T> uncheckedIO(ObjToDblE<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> NilToDbl bind(ObjToDbl<T> f, T t)
(t) to f, returning a new function
of type () -> double.T - the type of the argumentf - the unbound functiont - the argument() -> double that calls
f.call(t) and returns the result.default NilToDbl bind(T t)
(t) to this, returning a new function
of type () -> double.bind in interface ObjToDblE<T,RuntimeException>t - the argument() -> double that calls
this.call(t) and returns the result.default double applyAsDouble(T t)
this to act as a ToDoubleFunction<T>.applyAsDouble in interface ToDoubleFunction<T>t - the argumentCopyright © 2015. All rights reserved.