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

10
LINES

< > BotCompany Repo | #1008779 // stringTreeLeafValue

JavaX fragment (include)

1  
static <A> A stringTreeLeafValue(StringTree2<A> tree, L<S> items) {
2  
  int i = 0;
3  
  while (tree != null && i < l(items)) {
4  
    if (tree.leafValue != null)
5  
      ret tree.leafValue;
6  
    tree = tree.children.get(items.get(i));
7  
    ++i;
8  
  }
9  
  null;
10  
}

Author comment

Began life as a copy of #1008650

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: #1008779
Snippet name: stringTreeLeafValue
Eternal ID of this version: #1008779/3
Text MD5: 791c078f8b8989f68c3304dd08170883
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-06-03 16:43:04
Source code size: 255 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 473 / 526
Version history: 2 change(s)
Referenced in: [show references]