@FunctionalInterface
public interface Procedure0
Procedure1,
Procedure2,
Procedure3,
Procedure4,
Procedure5,
Procedure6,
Procedure7,
Procedure8,
Procedure9| Modifier and Type | Field and Description |
|---|---|
static Procedure0 |
NULL
Procedure with no arguments which does nothing.
|
| Modifier and Type | Method and Description |
|---|---|
void |
apply()
Run the function.
|
static <E extends java.lang.Exception> |
nonFragile(FragileProcedure0<E> fragileProc)
Convert a 0-argument procedure which might throw a checked exception into
one which does throw an unchecked exception.
|
static <E extends java.lang.Exception> |
nonFragileX(FragileProcedure0<E> fragileProc,
java.util.function.Consumer<? super E> exceptionHandler)
Convert a 0-argument procedure which might throw a checked exception into
one for which you can decide what happens with the exception.
|
@NotNull static final Procedure0 NULL
void apply()
@NotNull static <E extends java.lang.Exception> Procedure0 nonFragile(@NotNull FragileProcedure0<E> fragileProc)
WrappedFragileException for any
checked exception thrown during apply().E - exception typefragileProc - procedure throwing a checked exception@NotNull static <E extends java.lang.Exception> Procedure0 nonFragileX(@NotNull FragileProcedure0<E> fragileProc, @NotNull java.util.function.Consumer<? super E> exceptionHandler)
nonFragile(FragileProcedure0))E - exception typefragileProc - procedure throwing a checked exceptionexceptionHandler - exception handler. Its return value will be used as return value of the returned function.