static <A> L<A> treeView_allNodes(TreeView<A> t) { new L<A> out; if (t == null) ret out; TreeView<A> parent; while ((parent = t.parent()) != null) t = parent; new L<TreeView<A>> stack; stack.add(t); while (nempty(stack)) { t = popLast(stack); out.add(t.node()); addAll(stack, t.children()); } ret out; }
Began life as a copy of #1021572
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1021589 |
Snippet name: | treeView_allNodes - in some weird order |
Eternal ID of this version: | #1021589/5 |
Text MD5: | 5bc5d85ddd5172081a76a814ee6365ae |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-02-19 17:15:04 |
Source code size: | 346 bytes / 14 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 325 / 323 |
Version history: | 4 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |