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

11
LINES

< > BotCompany Repo | #1010247 // web_printWebTree - print WebTree

JavaX fragment (include)

1  
static void web_printWebTree(WebTree tree) {
2  
  web_printWebTree(tree, "", "");
3  
  print();
4  
}
5  
6  
static void web_printWebTree(WebTree tree, S indent, S relation) {
7  
  if (tree == null) ret;
8  
  print(indent + relation + tree.node.text());
9  
  for (Pair<WebNode, WebTree> p : tree.children)
10  
    web_printWebTree(p.b, indent + "  ", appendIfNempty(p.a.text(), " -> "));
11  
}

Author comment

Began life as a copy of #1010241

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: #1010247
Snippet name: web_printWebTree - print WebTree
Eternal ID of this version: #1010247/1
Text MD5: 6370501c8114b645cd5c1c33c74c076f
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 18:27:46
Source code size: 370 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 422 / 438
Referenced in: [show references]