Java Map Remove removeNullValues(Map map)

Here you can find the source of removeNullValues(Map map)

Description

Removes null values from the given map

License

Open Source License

Declaration

public static void removeNullValues(Map<String, ?> map) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.*;

public class Main {
    /**//from ww w.  ja  va2s .  c  o  m
     * Removes null values from the given map
     */
    public static void removeNullValues(Map<String, ?> map) {
        if (map == null)
            return;
        map.values().removeAll(Collections.singleton(null));
    }
}

Related

  1. removeNamespaces(Map properties)
  2. removeNode(Map map, List pathItems)
  3. removeNullEntries(Map map)
  4. removeNullPair(Map map)
  5. removeNullValues(final Map parameters)
  6. removeObject(Map map, T key)
  7. removeObjectProperty(Map properties, String key, Object defaultValue)
  8. removeOutStringsStrings(Map map, String newString)
  9. removeParamsForAlipaySign(Map map)