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

14
LINES

< > BotCompany Repo | #1025139 // PerfectTokenList [dev.]

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2827L/18K).

sclass PerfectTokenList extends AbstractList<S> {
  LogNArray<Token> list = new LogNArray;
  new MultiMap<S, Token> index;
  
  sclass Token {
    Token prev, next;
    S text;
  }
  
  sS text(Token t) { ret t == null ? null : t.text; }
  
  public S get(int i) { ret text(list.get(i)); }
  public int size() { ret l(list); }
}

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1025139
Snippet name: PerfectTokenList [dev.]
Eternal ID of this version: #1025139/4
Text MD5: 5503633ce90247561cad20806abdf995
Transpilation MD5: ed4e66052334519b50a27db02d3e977d
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-09-08 21:40:48
Source code size: 341 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 224 / 306
Version history: 3 change(s)
Referenced in: [show references]