public class Consumers
extends java.lang.Object
Consumer instances.| Modifier and Type | Method and Description |
|---|---|
static <T> void |
accept(java.util.function.Consumer<T> consumer,
T object)
Applies the given
Consumer action to the object if the consumer is not null. |
static <T> java.util.function.Consumer<T> |
nop()
Gets the NOP Consumer singleton.
|
public static <T> void accept(java.util.function.Consumer<T> consumer,
T object)
Consumer action to the object if the consumer is not null. Otherwise, does nothing.T - the type of the argument the consumer accepts.consumer - the consumer to consume.object - the object to be consumed.public static <T> java.util.function.Consumer<T> nop()
T - type type to consume.Copyright © 2010 - 2025 Adobe. All Rights Reserved