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

8
LINES

< > BotCompany Repo | #1024463 // mapPut2_createLinkedHashMap

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (33L/1K).

1  
static <A, B> LinkedHashMap<A, B> mapPut2_createLinkedHashMap(LinkedHashMap<A, B> map, A key, B value) {
2  
  if (key != null)
3  
    if (value != null) {
4  
      if (map == null) map = new LinkedHashMap;
5  
      map.put(key, value);
6  
    } else if (map != null) map.remove(key);
7  
  ret map;
8  
}

Author comment

Began life as a copy of #1008151

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: #1024463
Snippet name: mapPut2_createLinkedHashMap
Eternal ID of this version: #1024463/3
Text MD5: d47fbf5ea4e8edb015e6c89818325419
Transpilation MD5: c93de21ecbc62af073afddc25517c85b
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-08-13 18:48:34
Source code size: 288 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 183 / 241
Version history: 2 change(s)
Referenced in: [show references]