Class JavaUtils
java.lang.Object
org.springframework.pulsar.support.JavaUtils
Chained utility methods to simplify some Java repetitive code. Obtain a reference to
the singleton
INSTANCE
and then chain calls to the utility methods.- Author:
- Soby Chacko
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescription<T> JavaUtils
acceptIfNotNull
(T value, Consumer<T> consumer) InvokeConsumer.accept(Object)
with the value if it is not null.
-
Field Details
-
INSTANCE
The singleton instance of this utility class.
-
-
Method Details
-
acceptIfNotNull
InvokeConsumer.accept(Object)
with the value if it is not null.- Type Parameters:
T
- the value type.- Parameters:
value
- the value.consumer
- the consumer.- Returns:
- this.
-