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

4
LINES

< > BotCompany Repo | #1015525 // removeAndReturn - remove element from a collection and return the element

JavaX fragment (include)

static <B, A extends B> A removeAndReturn(Collection<B> c, A a) {
  if (c != null) c.remove(a);
  ret a;
}

Author comment

Began life as a copy of #1007299

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: #1015525
Snippet name: removeAndReturn - remove element from a collection and return the element
Eternal ID of this version: #1015525/1
Text MD5: d11e7989472b7d89dad1cc983d1bb758
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-05-15 13:24:34
Source code size: 109 bytes / 4 lines
Pitched / IR pitched: No / No
Views / Downloads: 411 / 447
Referenced in: [show references]