List of utility methods to do Map Remove
boolean | remove(Map, ?> map, String key) remove Iterator<?> it = map.keySet().iterator(); while (it.hasNext()) { Object keyObject = it.next(); if (keyObject instanceof String) { String k = (String) keyObject; if (k.compareTo(key) == 0) { it.remove(); return true; ... |
boolean | remove(Map remove boolean removed = false; Set<V> values = map.get(key); if (values != null) { removed = values.remove(value); if (values.isEmpty()) map.remove(key); return removed; ... |
void | remove(Mapif (map == null || map.isEmpty()) { return; if (keys == null || keys.isEmpty()) { return; for (K key : keys) { if (key == null) { ... |
V | remove(Map Removes the mapping for a key from this map if it is present. if (map == null) return null; return map.remove(key); |
void | removeAll(final Map Removes all the given keys from the given map and adds their corresponding values to the given collection. if (keys != null) {
removeAll(target, keys.iterator(), values);
|
void | removeAll(Map remove All for (K k : keys) {
map.remove(k);
|
boolean | removeAllFromCollection(Map remove All From Collection Collection list = (Collection) map.get(key); if (list == null) { return false; } else { boolean result = list.removeAll(values); if (list.isEmpty()) { map.remove(key); return result; |
Map | removeAllNullValueEntry(Map remove All Null Value Entry if (null == source) { return new HashMap<R, T>(); Map<R, T> map = new HashMap<R, T>(); for (Entry<R, T> entry : source.entrySet()) { if (null == entry.getValue() || null == entry.getKey()) { continue; map.put(entry.getKey(), entry.getValue()); return map; |
boolean | removeAndCleanFromCollectionMap(KeyT key, ValT toBeRemoved, Map NOTE Same as removeObjectFromCollectionMap but remove key if Collection is empty. Collection<ValT> obj = map.get(key); if (obj == null) { return false; Collection<ValT> coll = obj; final boolean ret = coll.remove(toBeRemoved); if (coll.isEmpty()) { map.remove(key); ... |
void | removeApiUuidMap(String apiName) remove Api Uuid Map apiUuidMap.remove(apiName); |