Skip to content

Instantly share code, notes, and snippets.

@upangka
Last active November 6, 2019 02:24
Show Gist options
  • Save upangka/beee24107520e9bc8eb0d9f5f2c8d39c to your computer and use it in GitHub Desktop.
Save upangka/beee24107520e9bc8eb0d9f5f2c8d39c to your computer and use it in GitHub Desktop.
// 删除entry,根据key 满足什么条件
map.entrySet().removeIf(e->e.getKey boolean condition);
// 删除entry,根据value 是否为null
map.values().removeIf(Objects::isNull);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment