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

8
LINES

< > BotCompany Repo | #1024464 // syncMapPut2_createLinkedHashMap

JavaX fragment (include)

static <A, B> LinkedHashMap<A, B> syncMapPut2_createLinkedHashMap(LinkedHashMap<A, B> map, A key, B value) {
  if (key != null)
    if (value != null) {
      if (map == null) map = new LinkedHashMap;
      synchronized(collectionMutex(map)) { map.put(key, value); }
    } else if (map != null) synchronized(collectionMutex(map)) { map.remove(key); }
  ret map;
}

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: 205 / 634
Version history: 3 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1030802 - syncMapRemove
#1031558 - syncMapPut2