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

4
LINES

< > BotCompany Repo | #1008400 // putIfNotThere - mapPut if key not there

JavaX fragment (include)

static <A, B> void putIfNotThere(Map<A, B> map, A key, B value) {
  if (map != null && key != null && value != null && !map.containsKey(key))
    map.put(key, value);
}

Author comment

Began life as a copy of #1007227

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1008400
Snippet name: putIfNotThere - mapPut if key not there
Eternal ID of this version: #1008400/1
Text MD5: 0fe7f4655effbac608d2b11a049cdefa
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-05-11 02:49:16
Source code size: 171 bytes / 4 lines
Pitched / IR pitched: No / No
Views / Downloads: 463 / 453
Referenced in: [show references]