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)

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

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: 342 / 383
Version history: 2 change(s)
Referenced in: [show references]