1 | static void web_moveRelations(WebNode src, WebNode dest) { |
2 | if (src == dest) ret; |
3 | Web web = src.web; |
4 | assertSame(web, dest.web); |
5 | |
6 | for (Pair<WebNode> p : cloneList(web_relations(web))) { |
7 | if (p.a == src && p.b != dest) { |
8 | web.getRelation(dest, p.b).addLabels(web.getRelation(p).labels); |
9 | web_deleteRelation(p.a, p.b); |
10 | } else if (p.b == src && p.a != dest) { |
11 | web.getRelation(p.a, dest).addLabels(web.getRelation(p).labels); |
12 | web_deleteRelation(p.a, p.b); |
13 | } |
14 | } |
15 | } |
Began life as a copy of #1009970
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: | #1010448 |
Snippet name: | web_moveRelations |
Eternal ID of this version: | #1010448/4 |
Text MD5: | 295dc042dfa950d8d14a425f2e2ad905 |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-11-27 11:19:14 |
Source code size: | 514 bytes / 15 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 473 / 480 |
Version history: | 3 change(s) |
Referenced in: | [show references] |