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

12
LINES

< > BotCompany Repo | #1020376 // stefansOS_parseRecommendedModulesList

JavaX fragment (include)

1  
static L<RecommendedModule> stefansOS_parseRecommendedModulesList(LS list) {
2  
  ret mapNonNulls(list, func(S s) -> RecommendedModule {
3  
    L<S> tok = javaTok(s);
4  
    S forPublic = jextractIdEqualsQuoted("forPublic", tok);
5  
    if (!isLinux() && cic(forPublic, "Linux")) null;
6  
    S moduleID = jextractIdEqualsQuoted("snippetID", tok);
7  
    S name = jextractIdEqualsQuoted("name", tok);
8  
    int prio = 0;
9  
    if (cic(forPublic, "prio -1")) prio = -1;
10  
    ret nu(RecommendedModule, +moduleID, +name, +prio);
11  
  });
12  
}

Author comment

Began life as a copy of #1019629

download  show line numbers  debug dex  old transpilations   

Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1020376
Snippet name: stefansOS_parseRecommendedModulesList
Eternal ID of this version: #1020376/4
Text MD5: da3e4bcf7efa7d7dbd5040a6c7655269
Author: stefan
Category: javax / stefan's os
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-01-21 14:56:06
Source code size: 521 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 253 / 297
Version history: 3 change(s)
Referenced in: [show references]