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

8
LINES

< > BotCompany Repo | #1020458 // mechMapPut - add or replace entry

JavaX fragment (include)

static S mechMapPut(S name, S key, S value) {
  SS map = mechMap(name);
  if (containsKey(map, key)) {
    map.put(key, value);
    ret editMechMap(name, map);
  } else
    ret appendToMechMap(name, litmap(key, value));
}

Author comment

Began life as a copy of #1014452

download  show line numbers  debug dex  old transpilations   

Travelled to 9 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, whxojlpjdney

No comments. add comment

Snippet ID: #1020458
Snippet name: mechMapPut - add or replace entry
Eternal ID of this version: #1020458/4
Text MD5: afb04d4d53b4bae8ec966496f5af0d63
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-12-22 23:42:46
Source code size: 228 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 295 / 335
Version history: 3 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1021664 - mechHashMapPut - add or replace entry, honor case, just append at the end