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

8
LINES

< > BotCompany Repo | #1024464 // syncMapPut2_createLinkedHashMap

JavaX fragment (include)

1  
static <A, B> LinkedHashMap<A, B> syncMapPut2_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  
      synchronized(collectionMutex(map)) { map.put(key, value); }
6  
    } else if (map != null) synchronized(collectionMutex(map)) { map.remove(key); }
7  
  ret map;
8  
}

Author comment

Began life as a copy of #1024463

download  show line numbers  debug dex  old transpilations   

Travelled to 12 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj, omdjrrnzbjjv, pyentgdyhuwx, pzhvpgtvlbxg, snaazhdonpnp, tvejysmllsmz, vouqrxazstgt, whxojlpjdney, xrpafgyirdlv

No comments. add comment

Snippet ID: #1024464
Snippet name: syncMapPut2_createLinkedHashMap
Eternal ID of this version: #1024464/4
Text MD5: c9b2a1733e1767f1a1d2906e00e033df
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-09-29 19:12:03
Source code size: 370 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 279 / 707
Version history: 3 change(s)
Referenced in: [show references]