The list of methods to do Map Remove are organized into topic(s).
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> map, K key, V value) 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(Map map, Collection keys)
if (map == null || map.isEmpty()) {
return;
if (keys == null || keys.isEmpty()) {
return;
for (K key : keys) {
if (key == null) {
...
V
remove(Map map, K key) Removes the mapping for a key from this map if it is present.
if (map == null)
return null;
return map.remove(key);
Map
removeAllNullValueEntry(Map source)
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> 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);
...