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

22
LINES

< > BotCompany Repo | #1030419 // parseExtendedCSV_iterator

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

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

1  
static ItIt<LS> parseExtendedCSV_iterator(ExtendedCSVParser parser default new, S csv) {
2  
  parser.csv = csv;
3  
  ret iff_endOnNull(new IF0<LS>() {
4  
    new LS currentRecord;
5  
    bool recordComplete;
6  
    
7  
    {
8  
      parser.onValueFound = v -> currentRecord.add(v);
9  
      parser.onEndOfRecord = () -> set recordComplete;
10  
    }
11  
    
12  
    public LS get() {
13  
      while (!recordComplete)
14  
        if (!parser.step())
15  
          null;
16  
      recordComplete = false;
17  
      LS record = currentRecord;
18  
      currentRecord = new L;
19  
      ret record;
20  
    }
21  
  });
22  
}

Author comment

Began life as a copy of #1030417

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1030419
Snippet name: parseExtendedCSV_iterator
Eternal ID of this version: #1030419/6
Text MD5: 882ef43e24121c12d96a3b921e93ce04
Transpilation MD5: 1da0bab6dc28f12a7274a8cbd3c4c2b3
Author: stefan
Category: javax / parsing
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-12-14 16:42:57
Source code size: 568 bytes / 22 lines
Pitched / IR pitched: No / No
Views / Downloads: 209 / 295
Version history: 5 change(s)
Referenced in: [show references]