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