Here you can find the source of merge(Map options, Map addition)
public static void merge(Map options, Map addition)
//package com.java2s; /* Copyright (c) 2001 - 2007 TOPP - www.openplans.org. All rights reserved. * This code is licensed under the GPL 2.0 license, availible at the root * application directory./* w w w.j a va 2 s . com*/ */ import java.util.Map; public class Main { public static void merge(Map options, Map addition) { for (Object o : addition.entrySet()) { Map.Entry entry = (Map.Entry) o; if (entry.getValue() == null) options.remove(entry.getKey()); else options.put(entry.getKey(), entry.getValue()); } } }