Package io.wcm.devops.conga.model.util
Class DefaultUtil
java.lang.Object
io.wcm.devops.conga.model.util.DefaultUtil
Helper methods for defaulting for fallback values if a given value is null.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> List<T> defaultEmptyList(List<T> list) Returns the given list, or an empty (modifiable) list if given null.static <K,V> Map <K, V> defaultEmptyMap(Map<K, V> map) Returns the given map, or an empty (modifiable) map if given null.
-
Method Details
-
defaultEmptyList
Returns the given list, or an empty (modifiable) list if given null.- Type Parameters:
T- Type- Parameters:
list- Given list- Returns:
- List (never null)
-
defaultEmptyMap
Returns the given map, or an empty (modifiable) map if given null.- Type Parameters:
K- Key typeV- Value type- Parameters:
map- Given map- Returns:
- Map (never null)
-