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

16
LINES

< > BotCompany Repo | #1007500 // remove - remove element from list/collection

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

Libraryless. Click here for Pure Java version (3775L/22K).

static <A> void remove(L<A> l, int i) {
  if (l != null && i >= 0 && i < l(l))
    l.remove(i);
}

static <A> void remove(Collection<A> l, A a) {
  if (l != null) l.remove(a);
}

static <A, B> B remove(Map<A, B> map, O a) {
  ret map == null ?: map.remove(a);
}

svoid remove(BitSet bs, int i) {
  bs.clear(i);
}

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: #1007500
Snippet name: remove - remove element from list/collection
Eternal ID of this version: #1007500/7
Text MD5: 01b96ebec493f7b75f8b9f6b5fe68eeb
Transpilation MD5: d5da0b7e5c1f071d714da69192924d03
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-10-15 21:07:09
Source code size: 327 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 752 / 927
Version history: 6 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1022927 - removeAndReturnCollection - remove element from list/collection
#1032614 - remove_trueIfChanged