Libraryless. Click here for Pure Java version (50L/1K).
1 | static <A, B> void removeValue(Map<A, B> map, B value) {
|
2 | if (map == null) ret; |
3 | Iterator<Map.Entry<A, B>> i = map.entrySet().iterator(); |
4 | while (i.hasNext()) {
|
5 | Map.Entry e = i.next(); |
6 | if (eq(e.getValue(), value)) |
7 | i.remove(); |
8 | } |
9 | } |
Began life as a copy of #1023716
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1023907 |
| Snippet name: | removeValue - remove from map by value |
| Eternal ID of this version: | #1023907/3 |
| Text MD5: | 61729fa51692610b6004feef78bebedd |
| Transpilation MD5: | e8538b17617739f62e6c2e981ec9e8ab |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2019-07-12 01:35:14 |
| Source code size: | 256 bytes / 9 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 447 / 609 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |