List of utility methods to do Map Remove
void | removeClassFromMap(final Map the_map, final String the_class_name) Removes a class from a database of debugging-enabled classes. if ("*".equals(the_class_name)) { the_map.clear(); } else the_map.remove(the_class_name); |
int | removeColor(Map remove Color boolean removedAColor = false; Integer colorCount = windowColorCountMap.get(lastColor); if (colorCount == 1) removedAColor = true; windowColorCountMap.put(lastColor, colorCount - 1); return removedAColor ? windowColorCount - 1 : windowColorCount; |
void | removeDefaultAnnotationPackage(final String packageName, final Map remove Default Annotation Package final List<String> list = getPackageListDecoration(context);
list.remove(packageName);
|
void | removeDoubleQuotes(Map Removes double quotes from arguments' value String value = null; for (String key : argMap.keySet()) { value = argMap.get(key); if (value != null && value.startsWith("\"") && value.endsWith("\"")) { argMap.put(key, value.substring(1, value.length() - 1)); |
void | removeElementFromJsonMap(Map removes from Json map (toscaJson) first element found by name (elementName) note that this method could update the received argument toscaJson for (Entry<String, Object> entry : toscaJson.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); if (key.equals(elementName)) { toscaJson.remove(elementName); return; } else if (value instanceof Map) { removeElementFromJsonMap((Map<String, Object>) value, elementName); ... |
Map | removeEmptyArray(Map remove Empty Array if (map != null && !map.isEmpty()) { Iterator<Map.Entry<K, V>> i = map.entrySet().iterator(); while (i.hasNext()) { Map.Entry<K, V> entry = i.next(); V value = entry.getValue(); if ((value instanceof Object[]) && ((Object[]) value).length == 0) i.remove(); return map; |
Map | removeEmptyValues(Map Strip all entries from params whose value is either null or the empty string. for (Iterator<Map.Entry<String, String>> iter = params.entrySet().iterator(); iter.hasNext();) { Map.Entry<String, String> entry = iter.next(); if (null == entry.getValue() || "".equals(entry.getValue())) { iter.remove(); return params; |
Map | removeExistingItemsFromProvided(Map remove Existing Items From Provided Map<String, T> unexistingItems = new HashMap<String, T>(providedItems.size()); for (Entry<String, T> entry : providedItems.entrySet()) if (!existingItems.containsKey(entry.getKey())) unexistingItems.put(entry.getKey(), entry.getValue()); return unexistingItems; |
V | removeFrom(Map super K, V> map, K key) remove From if (map == null) { return null; return map.remove(key); |
boolean | removeFromMap(Map remove From Map C collection = map.get(key); if (collection == null) { return false; boolean success = collection.remove(value); if (success && collection.size() == 0) { return map.remove(key) != null; return success; |