Code example for ConcurrentHashMap

Methods: isEmpty

0
        } 
    } 
 
    private boolean clean() { 
        // no pending adds or removes 
        return addset.isEmpty() && removeset.isEmpty();
    } 
 
    private JSONObject mergedConfig() {
        JSONObject c = config;
 
        if (c != null) {
            // update only if the node has not been deleted. 
 
            try { 
                for (String k : removeset.keySet())
                    c.remove(k);
 
                for (Map.Entry<String, String> e : addset.entrySet())
                    c.put(e.getKey(), e.getValue());