Libraryless. Click here for Pure Java version (31L/1K).
static <A, B> AutoCloseable tempRemove(Map<A, B> map, A key) { if (map == null || !map.containsKey(key)) null; B b = map.get(key); map.remove(key); ret autocloseable { map.put(key, b); }; }
Began life as a copy of #1017722
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
Snippet ID: | #1031184 |
Snippet name: | tempRemove - temporarily remove key from map |
Eternal ID of this version: | #1031184/5 |
Text MD5: | f896de531e82402da0a10506d298ad46 |
Transpilation MD5: | 903034b4b279a2ab01d49a2849469f54 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-05-19 20:43:01 |
Source code size: | 202 bytes / 6 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 143 / 215 |
Version history: | 4 change(s) |
Referenced in: | [show references] |