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

17
LINES

< > BotCompany Repo | #1018273 // itemToMap_ExecutedRule

JavaX fragment (include)

1  
static F1<ExecutedRule, Map> itemToMap_ExecutedRule() {
2  
  ret func(ExecutedRule r) -> Map {
3  
    Map map = litorderedmap(
4  
      Output := nullIfEmpty(join("|", r.output)),
5  
      Facts := nullIfEmpty(join("|", r.facts)),
6  
      "New Input" := nullIfEmpty(join("|", r.newInput)));
7  
    RuleWithParams rule = r.rule;
8  
    if (rule cast FailedRule) {
9  
      mapPut(map, "Failure Level" := nlLogic_failureLevelString(r));
10  
      mapPut(map, "Satisfied Conditions" := empty(rule.satisfiedConditions) ? null : join(" && ", allToString(rule.satisfiedConditions)));
11  
      mapPut(map, "Remaining Conditions" := simpleSpaces3(strOrNull(rule.remainingCondition)));
12  
    }
13  
    mapPut(map, "Rule ID" := r.ruleID());
14  
    mapPut(map, Details := rule);
15  
    ret map;
16  
  };
17  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1018273
Snippet name: itemToMap_ExecutedRule
Eternal ID of this version: #1018273/11
Text MD5: 75d6b7bb0e696f4e614e14459fd23642
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-09-19 22:25:35
Source code size: 764 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 342 / 399
Version history: 10 change(s)
Referenced in: [show references]