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   

Travelled to 5 computer(s): mqqgnosmbjvj, omdjrrnzbjjv, tvejysmllsmz, 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: 22 / 90
Version history: 3 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1024464 & http://1024464.tinybrain.de