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

6
LINES

< > BotCompany Repo | #1003252 - mapWithoutKey - clone map (if necessary), drop a key

JavaX fragment (include)

static <A, B> Map<A, B> mapWithoutKey(Map<A, B> map, A key) {
  if (map == null || !map.containsKey(key)) ret map;
  Map m = cloneMap(map);
  m.remove(key);
  ret m;
}

download  show line numbers  debug dex   

Travelled to 9 computer(s): aoiabmzegqzx, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, tslmcundralx, tvejysmllsmz

No comments. add comment

Snippet ID: #1003252
Snippet name: mapWithoutKey - clone map (if necessary), drop a key
Eternal ID of this version: #1003252/4
Text MD5: 6057abea513e2353b43f592c8775a7d2
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-11-06 14:01:40
Source code size: 172 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 391 / 331
Version history: 3 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1003252 & http://1003252.tinybrain.de