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

19
LINES

< > BotCompany Repo | #1009963 // calToWeb

JavaX fragment (include)

1  
static Web calToWeb(CirclesAndLines cal) {
2  
  new Web web;
3  
  web.globalID = cal.globalID;
4  
  web_useCLParse(web, false);
5  
  web.title = cal.title;
6  
  web.created = cal.created;
7  
  new HashMap<Circle, WebNode> map;
8  
  for (Circle c : cal.circles) {
9  
    WebNode node = web.newNode(c.text);
10  
    copyFields(c, node, 'x, 'y);
11  
    node.visInfo(c.quickvis);
12  
    map.put(c, node);
13  
  }
14  
  for (Line l : cal.lines) {
15  
    WebNode rel = web.getRelation(assertNotNull(map.get(l.a)), assertNotNull(map.get(l.b)));
16  
    rel.addLabel(l.text);
17  
  }
18  
  ret web;
19  
}

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: #1009963
Snippet name: calToWeb
Eternal ID of this version: #1009963/10
Text MD5: 7b0d705340ab1dc8c59f3ec866f5fa68
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 17:46:33
Source code size: 553 bytes / 19 lines
Pitched / IR pitched: No / No
Views / Downloads: 512 / 538
Version history: 9 change(s)
Referenced in: [show references]