Method
_walk
( Function<Node,E> pred )
Source from the content-addressed store, hash-verified
| 638 | } |
| 639 | |
| 640 | private <E> E _walk( Function<Node,E> pred ) { |
| 641 | if( WVISIT.get(_nid) ) return null; // Been there, done that |
| 642 | WVISIT.set(_nid); |
| 643 | E x = pred.apply(this); |
| 644 | if( x != null ) return x; |
| 645 | for( Node def : _inputs ) if( def != null && (x = def._walk(pred)) != null ) return x; |
| 646 | for( Node use : _outputs ) if( use != null && (x = use._walk(pred)) != null ) return x; |
| 647 | return null; |
| 648 | } |
| 649 | |
| 650 | /** |
| 651 | * Debugging utility to find a Node by index |
Tested by
no test coverage detected