More formal constant definition.
This commit is contained in:
Gary Gregory 2022-03-10 12:40:37 -05:00
parent 38285a15f5
commit 08f374f0d7

View File

@ -19,12 +19,17 @@
import java.util.Objects;
import java.util.function.Consumer;
import java.util.function.Function;
/**
* A functional interface like {@link Consumer} that declares a {@code Throwable}.
*
* @param <T> Consumed type 1.
* @param <E> Thrown exception.
* <p>
* This is a functional interface whose functional method is {@link #accept(Object)}.
* </p>
*
* @param <T> the type of the input to the operation
* @param <E> Thrown exception type.
* @since 3.11
*/
@FunctionalInterface
@ -32,7 +37,7 @@ public interface FailableConsumer<T, E extends Throwable> {
/** NOP singleton */
@SuppressWarnings("rawtypes")
FailableConsumer NOP = t -> {/* NOP */};
FailableConsumer NOP = Function.identity()::apply;
/**
* Returns The NOP singleton.