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

17
LINES

< > BotCompany Repo | #1018273 // itemToMap_ExecutedRule

JavaX fragment (include)

static F1<ExecutedRule, Map> itemToMap_ExecutedRule() {
  ret func(ExecutedRule r) -> Map {
    Map map = litorderedmap(
      Output := nullIfEmpty(join("|", r.output)),
      Facts := nullIfEmpty(join("|", r.facts)),
      "New Input" := nullIfEmpty(join("|", r.newInput)));
    RuleWithParams rule = r.rule;
    if (rule cast FailedRule) {
      mapPut(map, "Failure Level" := nlLogic_failureLevelString(r));
      mapPut(map, "Satisfied Conditions" := empty(rule.satisfiedConditions) ? null : join(" && ", allToString(rule.satisfiedConditions)));
      mapPut(map, "Remaining Conditions" := simpleSpaces3(strOrNull(rule.remainingCondition)));
    }
    mapPut(map, "Rule ID" := r.ruleID());
    mapPut(map, Details := rule);
    ret map;
  };
}

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: 412 / 472
Version history: 10 change(s)
Referenced in: [show references]