Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

6
LINES

< > BotCompany Repo | #1017682 // subHashMap - getOrCreate with HashMap

JavaX fragment (include)

static <A, B, C> Map<B, C> subHashMap(Map<A, Map<B, C>> map, A key) {
  Map<B, C> subMap = map.get(key);
  if (subMap == null)
    map.put(key, subMap = new HashMap);
  ret subMap;
}

Author comment

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: 271 / 315
Referenced in: [show references]