Class MapSplitter

java.lang.Object
io.wcm.devops.conga.model.util.MapSplitter

public final class MapSplitter extends Object
Splits up maps.
  • Method Details

    • 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.