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 (map != null && key != null)
    if (value != null) {
      if (map == null) map = new LinkedHashMap;
      synchronized(collectionMutex(map)) { map.put(key, value); }
    } else 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 2 computer(s): mqqgnosmbjvj, tvejysmllsmz

No comments. add comment

Snippet ID: #1024464
Snippet name: syncMapPut2_createLinkedHashMap
Eternal ID of this version: #1024464/1
Text MD5: 548d14a6da1352e46b5f8aa6dfc3c411
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-08-13 12:50:24
Source code size: 368 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 3 / 12
Referenced in: [show references]