Package io.wcm.devops.conga.model.util
Class MapSplitter
- java.lang.Object
-
- io.wcm.devops.conga.model.util.MapSplitter
-
public final class MapSplitter extends Object
Splits up maps.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MapSplitter.SplitResult
Result ofsplitMap(Map, Predicate)
method.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static @NotNull MapSplitter.SplitResult
splitMap(Map<String,Object> map, @NotNull Predicate<Map.Entry<String,Object>> matcher)
Splits a map in two parts.
-
-
-
Method Detail
-
splitMap
@NotNull public static @NotNull MapSplitter.SplitResult splitMap(Map<String,Object> map, @NotNull @NotNull Predicate<Map.Entry<String,Object>> matcher)
Splits a map in two parts.- Parameters:
map
- Map to splitmatcher
- Matcher function which is called on each (non-structural) entry to decide whether to put it in the matching map or unmatching map.- Returns:
- Result with the first map (matching) with all matching values, and the second map (unmatching) with all values that do not match.
-
-