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

8
LINES

< > BotCompany Repo | #1010257 // webs_matchNodes - try to pair up nodes in two webs by name - returns only matched nodes

JavaX fragment (include)

1  
static L<Pair<WebNode>> webs_matchNodes(Web a, Web b) {
2  
  Map<S, WebNode> index1 = web_textIndex(a);
3  
  Map<S, WebNode> index2 = web_textIndex(b);
4  
  new L<Pair<WebNode>> out;
5  
  for (S text : setIntersection(keys(index1), keys(index2)))
6  
    out.add(pair(index1.get(text), index2.get(text)));
7  
  ret out;
8  
}

Author comment

Began life as a copy of #1010252

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: #1010257
Snippet name: webs_matchNodes - try to pair up nodes in two webs by name - returns only matched nodes
Eternal ID of this version: #1010257/2
Text MD5: c11f4b91b76a3da0978b6b6715db1de1
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-09-07 19:04:56
Source code size: 309 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 379 / 425
Version history: 1 change(s)
Referenced in: [show references]