Libraryless. Click here for Pure Java version (2721L/16K).
static <A, B> void removeFromMapWhereValue(Map<A, B> map, IPred<B> pred) { if (map == null) ret; Iterator<Map.Entry<A, B>> i = map.entrySet().iterator(); while (i.hasNext()) { Map.Entry<A, B> e = i.next(); if (pred.get(e.getValue())) i.remove(); } }
Began life as a copy of #1027983
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
Snippet ID: | #1030707 |
Snippet name: | removeFromMapWhereValue |
Eternal ID of this version: | #1030707/1 |
Text MD5: | 5f2f8ecd1a4b1e02b6f38e1892b82b91 |
Transpilation MD5: | 6bb56548f9a77cca04a1f502c7f310aa |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-03-13 17:36:24 |
Source code size: | 279 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 187 / 273 |
Referenced in: | [show references] |