Package liquibase.util
Class CollectionUtil
java.lang.Object
liquibase.util.CollectionUtil
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> List<T>
createIfNull
(List<T> currentValue) Deprecated.static <T,
E> Map<T, E> createIfNull
(Map<T, E> currentValue) Deprecated.useCollectionUtils
insteadstatic <T> Set<T>
createIfNull
(Set<T> currentValue) Deprecated.useCollectionUtils
insteadstatic <T> T[]
createIfNull
(T[] arguments) Deprecated.useCollectionUtils
insteadstatic String
findKeyInMapIgnoreCase
(String key, Map<String, Object> map) Find the actual key in a map, by searching the keys in the map and checking them ignoring case.Converts a set of nested maps (like from yaml/json) into a flat map with dot-separated propertiespermutations
(Map<String, List<T>> parameterValues) powerSet
(Collection<T> originalSet)
-
Constructor Details
-
CollectionUtil
public CollectionUtil()
-
-
Method Details
-
powerSet
-
permutations
-
createIfNull
Deprecated.useCollectionUtils
insteadReturns passed currentValue if it is not null and creates a new ArrayList if it is null.
Example: values = createIfNull(values) -
createIfNull
Deprecated.useCollectionUtils
insteadReturns a new empty array if the passed array is null. -
createIfNull
Deprecated.useCollectionUtils
insteadReturns a new empty set if the passed set is null. -
createIfNull
Deprecated.useCollectionUtils
insteadReturns a new empty map if the passed map is null. -
flatten
Converts a set of nested maps (like from yaml/json) into a flat map with dot-separated properties -
findKeyInMapIgnoreCase
Find the actual key in a map, by searching the keys in the map and checking them ignoring case.- Parameters:
key
- the key to search for, in any casemap
- the map in which to search- Returns:
- the properly cased key, if found, or null if not found
-
CollectionUtils
instead