Package io.awspring.cloud.sqs
Class ConfigUtils
java.lang.Object
io.awspring.cloud.sqs.ConfigUtils
Utility class for conditional configurations.
- Since:
- 3.0
- Author:
- Tomaz Fernandes
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescription<T,
V> ConfigUtils acceptBothIfNoneNull
(T firstValue, V secondValue, BiConsumer<T, V> consumer) final <T> ConfigUtils
acceptFirstNonNull
(Consumer<T> consumer, T... values) <T> ConfigUtils
acceptIfInstance
(Object value, Class<T> clazz, Consumer<T> consumer) <T> ConfigUtils
acceptIfNotEmpty
(Collection<T> value, Consumer<Collection<T>> consumer) <T> ConfigUtils
acceptIfNotNull
(T value, Consumer<T> consumer) <T> ConfigUtils
acceptIfNotNullOrElse
(Consumer<T> consumer, T value, T fallback) <T> ConfigUtils
acceptMany
(Collection<T> values, Consumer<T> consumer) <T> ConfigUtils
acceptManyIfInstance
(Collection<?> values, Class<T> clazz, Consumer<T> consumer)
-
Field Details
-
INSTANCE
-
-
Method Details
-
acceptIfNotNull
-
acceptIfNotNullOrElse
-
acceptBothIfNoneNull
public <T,V> ConfigUtils acceptBothIfNoneNull(@Nullable T firstValue, @Nullable V secondValue, BiConsumer<T, V> consumer) -
acceptFirstNonNull
-
acceptIfNotEmpty
-
acceptIfInstance
public <T> ConfigUtils acceptIfInstance(@Nullable Object value, Class<T> clazz, Consumer<T> consumer) -
acceptManyIfInstance
public <T> ConfigUtils acceptManyIfInstance(Collection<?> values, Class<T> clazz, Consumer<T> consumer) -
acceptMany
-