Java tutorial
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { /** * Removes null values from the given map */ public static void removeNullValues(Map<String, ?> map) { if (map == null) return; map.values().removeAll(Collections.singleton(null)); } }