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, Chris Bono
-
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.boolean
Determine if the specified class is a Lambda.
-
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.
-
isLambda
Determine if the specified class is a Lambda.- Parameters:
clazz
- the class to check- Returns:
- whether the specified class is a Lambda
-