@Test void testDeepMerge() { final HashMap<String, Object> target = new HashMap<>(); NestedMaps.deepMerge(target, NESTED_MAP_1); NestedMaps.deepMerge(target, NESTED_MAP_2); checkTargetMap(target); }
public static <T> Map<String, T> deepMerge(final Stream<Map<String, T>> mapStream) { final Map<String, T> out = new HashMap<>(); mapStream.forEach(m -> deepMerge(out, m)); return out; }
NestedMaps { public static <T> Map<String, T> deepMerge(final Stream<Map<String, T>> mapStream) { final Map<String, T> out = new HashMap<>(); mapStream.forEach(m -> deepMerge(out, m)); return out; } }
NestedMaps { public static <T> Map<String, T> deepMerge(final Stream<Map<String, T>> mapStream) { final Map<String, T> out = new HashMap<>(); mapStream.forEach(m -> deepMerge(out, m)); return out; } private  NestedMaps(); }
NestedMaps { public static <T> Map<String, T> deepMerge(final Stream<Map<String, T>> mapStream) { final Map<String, T> out = new HashMap<>(); mapStream.forEach(m -> deepMerge(out, m)); return out; } private  NestedMaps(); @SuppressWarnings("unchecked") static Optional<T> getValue(Map<String, Object> data, String path); static Map<String, T> deepMerge(final Stream<Map<String, T>> mapStream); @SuppressWarnings({ "rawtypes", "unchecked" }) static void deepMerge(Map left, Map right); static Map<String, Object> unflatten(Map<String, Object> flattened); }
NestedMaps { public static <T> Map<String, T> deepMerge(final Stream<Map<String, T>> mapStream) { final Map<String, T> out = new HashMap<>(); mapStream.forEach(m -> deepMerge(out, m)); return out; } private  NestedMaps(); @SuppressWarnings("unchecked") static Optional<T> getValue(Map<String, Object> data, String path); static Map<String, T> deepMerge(final Stream<Map<String, T>> mapStream); @SuppressWarnings({ "rawtypes", "unchecked" }) static void deepMerge(Map left, Map right); static Map<String, Object> unflatten(Map<String, Object> flattened);  }