public class CollectionUtil extends Object
Constructor and Description |
---|
CollectionUtil() |
Modifier and Type | Method and Description |
---|---|
static <T> List<T> |
createIfNull(List<T> currentValue)
Returns passed currentValue if it is not null and creates a new ArrayList if it is null.
|
static <T,E> Map<T,E> |
createIfNull(Map<T,E> currentValue)
Returns a new empty map if the passed map is null.
|
static <T> Set<T> |
createIfNull(Set<T> currentValue)
Returns a new empty set if the passed set is null.
|
static <T> T[] |
createIfNull(T[] arguments)
Returns a new empty array if the passed array is null.
|
static Map<String,Object> |
flatten(Map<String,Object> map)
Converts a set of nested maps (like from yaml/json) into a flat map with dot-separated properties
|
static <T> List<Map<String,T>> |
permutations(Map<String,List<T>> parameterValues) |
static <T> Set<Set<T>> |
powerSet(Collection<T> originalSet) |
public static <T> Set<Set<T>> powerSet(Collection<T> originalSet)
public static <T> List<Map<String,T>> permutations(Map<String,List<T>> parameterValues)
public static <T> List<T> createIfNull(List<T> currentValue)
public static <T> T[] createIfNull(T[] arguments)
public static <T> Set<T> createIfNull(Set<T> currentValue)
public static <T,E> Map<T,E> createIfNull(Map<T,E> currentValue)
Copyright © 2023 Liquibase.org. All rights reserved.