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

19
LINES

< > BotCompany Repo | #1017767 // SimpleMechLists - simple in-memory implementation of VirtualMechLists

JavaX fragment (include)

1  
sclass SimpleMechLists extends VirtualMechLists {
2  
  SS lists = syncCIMap();
3  
  bool verbose;
4  
  
5  
  S mL_raw(S listName) {
6  
    if (verbose) print("List requested: " + listName);
7  
    ret lists.get(listName);
8  
  }
9  
  
10  
  void append(S listName, S text) {
11  
    if (verbose) print("Appending to " + listName);
12  
    lists.put(listName, appendNewLineIfNempty(lists.get(listName)) + text);
13  
  }
14  
  
15  
  void setText(S listName, S text) {
16  
    if (verbose) print("Replacing: " + listName);
17  
    lists.put(listName, text);
18  
  }
19  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1017767
Snippet name: SimpleMechLists - simple in-memory implementation of VirtualMechLists
Eternal ID of this version: #1017767/4
Text MD5: 140a0eef0f84090b58022155251e33aa
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-08-10 14:17:01
Source code size: 523 bytes / 19 lines
Pitched / IR pitched: No / No
Views / Downloads: 403 / 938
Version history: 3 change(s)
Referenced in: [show references]