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

5
LINES

< > BotCompany Repo | #1017590 // canPutStrictly - return true if value can be put strictly (not overwriting anything)

JavaX fragment (include)

static <A, B> bool canPutStrictly(Map<A, B> map, A key, B value) {
  if (!(map != null && key != null && value != null)) true;
  B old = map.get(key);
  ret old == null || eq(old, value);
}

Author comment

Began life as a copy of #1012146

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1017590
Snippet name: canPutStrictly - return true if value can be put strictly (not overwriting anything)
Eternal ID of this version: #1017590/1
Text MD5: ac2b55cf9395e336a94725bc0f42706e
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-07-28 12:15:44
Source code size: 193 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 351 / 380
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1017833 - canPutStrictlyIC - return true if value can be put strictly (not overwriting anything)