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)

sclass SimpleMechLists extends VirtualMechLists {
  SS lists = syncCIMap();
  bool verbose;
  
  S mL_raw(S listName) {
    if (verbose) print("List requested: " + listName);
    ret lists.get(listName);
  }
  
  void append(S listName, S text) {
    if (verbose) print("Appending to " + listName);
    lists.put(listName, appendNewLineIfNempty(lists.get(listName)) + text);
  }
  
  void setText(S listName, S text) {
    if (verbose) print("Replacing: " + listName);
    lists.put(listName, text);
  }
}

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: 404 / 938
Version history: 3 change(s)
Referenced in: #1017802 - ServerMechLists - might be recursive
#1017840 - DefaultMechLists
#1017869 - DerivedMechLists
#1034167 - Standard Classes + Interfaces (LIVE, continuation of #1003674)