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

6
LINES

< > BotCompany Repo | #1027583 // mapPutOrRemove_trueIfChanged

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (55L/1K).

1  
static <A, B> bool mapPutOrRemove_trueIfChanged(Map<A, B> map, A key, B value) {
2  
  if (value != null)
3  
    ret mapPut_trueIfChanged(map, key, value);
4  
  if (map == null || key == null) false;
5  
  ret map.remove(key) != null;
6  
}

Author comment

Began life as a copy of #1015755

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1027583
Snippet name: mapPutOrRemove_trueIfChanged
Eternal ID of this version: #1027583/1
Text MD5: 2e8bc94dcb1ae7640372a2d42ad6d9f4
Transpilation MD5: 998c03e175a8e111157d7ad847b5834f
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-03-25 11:51:59
Source code size: 227 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 198 / 285
Referenced in: [show references]