1 | static <A, B, C> Map<B, C> subHashMap(Map<A, Map<B, C>> map, A key) { |
2 | Map<B, C> subMap = map.get(key); |
3 | if (subMap == null) |
4 | map.put(key, subMap = new HashMap); |
5 | ret subMap; |
6 | } |
Began life as a copy of #1013935
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1017682 |
Snippet name: | subHashMap - getOrCreate with HashMap |
Eternal ID of this version: | #1017682/1 |
Text MD5: | fcf1d210c4131216532c4a7732fbd393 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-08-02 16:44:28 |
Source code size: | 187 bytes / 6 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 341 / 379 |
Referenced in: | [show references] |