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

10
LINES

< > BotCompany Repo | #1010973 // web_commonTexts - texts that all nodes in a list have in common

JavaX fragment (include)

1  
static L<S> web_commonTexts(Collection<WebNode> nodes) {
2  
  if (empty(nodes)) ret ll();
3  
  TreeSet<S> set = null;
4  
  for (WebNode n : nodes) {
5  
    if (set == null) set = new TreeSet(web_texts(n));
6  
    else removeAllBut(set, web_texts(n));
7  
    if (empty(set)) break;
8  
  }
9  
  ret asList(set);
10  
}

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: #1010973
Snippet name: web_commonTexts - texts that all nodes in a list have in common
Eternal ID of this version: #1010973/4
Text MD5: 6646baba4c99df034006639484c9079c
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-10-10 20:16:28
Source code size: 296 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 367 / 424
Version history: 3 change(s)
Referenced in: [show references]