Libraryless. Click here for Pure Java version (2482L/16K).
static <A, B> void removeFromMapWhere(Map<A, B> map, IF2<A, B, Bool> 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.getKey(), e.getValue())) i.remove(); } }
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1027983 |
Snippet name: | removeFromMapWhere |
Eternal ID of this version: | #1027983/4 |
Text MD5: | 91bac7268997aa4a79e7bdcf0acf8ba9 |
Transpilation MD5: | d232d7dc88281a0ee6e3e198308c82aa |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-04-23 10:16:26 |
Source code size: | 293 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 199 / 285 |
Version history: | 3 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1030707 - removeFromMapWhereValue |