Libraryless. Click here for Pure Java version (2126L/14K).
1 | static <A, B> void mapLike transformValueInPlace(O f, Map<A, B> map, A key) {
|
2 | if (f != null && map != null && map.containsKey(key)) |
3 | map.put(key, (B) callF(f, map.get(key))); |
4 | } |
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: | #1026280 |
| Snippet name: | transformValueInPlace |
| Eternal ID of this version: | #1026280/3 |
| Text MD5: | 8ea74f7d98fe862df1380f6209717ef8 |
| Transpilation MD5: | f3b3906b3cf12ac54cf5ae3ef455d734 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2019-12-11 14:22:56 |
| Source code size: | 184 bytes / 4 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 411 / 557 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |