MCPcopy Create free account
hub / github.com/SeaOfNodes/Simple / _find

Method _find

chapter06/src/main/java/com/seaofnodes/simple/node/Node.java:405–419  ·  view source on GitHub ↗
(BitSet visit, int nid)

Source from the content-addressed store, hash-verified

403 */
404 public Node find(int nid) { return _find(new BitSet(),nid); }
405 private Node _find(BitSet visit, int nid) {
406 if( _nid==nid ) return this;
407 if( visit.get(_nid) ) return null;
408 visit.set(_nid);
409 for( Node def : _inputs )
410 if( def!=null ) {
411 Node rez = def._find(visit,nid);
412 if( rez != null ) return rez;
413 }
414 for( Node use : _outputs ) {
415 Node rez = use._find(visit,nid);
416 if( rez != null ) return rez;
417 }
418 return null;
419 }
420}

Callers 1

findMethod · 0.95

Calls 2

getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected