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

7
LINES

< > BotCompany Repo | #1019151 // filterListInPlace - efficient only with LinkedList

JavaX fragment (include)

static void mapLike filterListInPlace(O pred, L l) {
  if (l == null) ret;
  ListIterator it = listIterator(l);
  while (it.hasNext())
    if (!isTrue(callF(pred, it.next())))
      it.remove();
}

Author comment

Began life as a copy of #1016987

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1019151
Snippet name: filterListInPlace - efficient only with LinkedList
Eternal ID of this version: #1019151/3
Text MD5: e643c49ff57f69bc268faf34f1864085
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-07-15 15:51:53
Source code size: 202 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 343 / 384
Version history: 2 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1024006 - syncFilterLinkedListInPlace
#1033591 - filterCollectionInPlace