Class MapSplitter


  • public final class MapSplitter
    extends Object
    Splits up maps.
    • 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 split
        matcher - 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.