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

18
LINES

< > BotCompany Repo | #1007849 // class Thoughts

JavaX fragment (include)

1  
sclass Thoughts {
2  
  new LinkedHashSet<Lisp> statements;
3  
  new MultiMap<S, Lisp> statementsByHead;
4  
  
5  
  bool add(Lisp statement) {
6  
    if (statement == null) false;
7  
    bool isNew = statements.add(statement);
8  
    if (isNew)
9  
      statementsByHead.put(statement.head, statement);
10  
    ret isNew;
11  
  }
12  
  
13  
  // assumes s is a global ID
14  
  bool has(S s) {
15  
    assertPossibleGlobalID(s);
16  
    ret statements.contains(lisp(s));
17  
  }
18  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1007849
Snippet name: class Thoughts
Eternal ID of this version: #1007849/6
Text MD5: f5d8bfb74d2ac6c484678a493919795c
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-04-13 14:00:00
Source code size: 439 bytes / 18 lines
Pitched / IR pitched: No / No
Views / Downloads: 403 / 995
Version history: 5 change(s)
Referenced in: [show references]