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

Method _find

chapter24/src/main/java/com/seaofnodes/simple/node/Node.java:727–735  ·  view source on GitHub ↗
(int nid, BitSet bs)

Source from the content-addressed store, hash-verified

725 */
726 public Node find(int nid) { return _find(nid, new BitSet()); }
727 private Node _find(int nid, BitSet bs) {
728 if( bs.get(_nid) ) return null; // Been there, done that
729 bs.set(_nid);
730 if( _nid==nid ) return this;
731 Node x;
732 for( Node def : _inputs ) if( def != null && (x = def._find(nid,bs)) != null ) return x;
733 for( Node use : _outputs ) if( use != null && (x = use._find(nid,bs)) != null ) return x;
734 return null;
735 }
736}

Callers 1

findMethod · 0.95

Calls 2

getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected