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

17
LINES

< > BotCompany Repo | #1009833 // web_findForwardRelated

JavaX fragment (include)

static WebNode web_findForwardRelated(WebNode node, S relationLabel) {
  ret web_findForwardRelated(node, node.web.parseLabel(relationLabel));
}

static WebNode web_findForwardRelated(WebNode node, Lisp relationLabel) {
  ret web_findForwardRelated(node.web, node, relationLabel);
}

static WebNode web_findForwardRelated(Web web, WebNode node, Lisp relationLabel) {
  for (Pair<WebNode> p : keys(web.relations))
    if (p.a == node) {
      WebNode rel = web.relations.get(p);
      if (rel.hasLabel(relationLabel))
        ret p.b;
    }
  null;
}

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: #1009833
Snippet name: web_findForwardRelated
Eternal ID of this version: #1009833/4
Text MD5: d5674344573a1c4090b495e40fc3ab3b
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-09-03 23:46:03
Source code size: 565 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 498 / 524
Version history: 3 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1009834 - web_allForwardRelated
#1010016 - web_forwardRelationTo
#1010114 - web_findBackwardRelated