Method
walk
( Function<Node,E> pred )
Source from the content-addressed store, hash-verified
| 612 | // Utility to walk the entire graph applying a function; return the first |
| 613 | // not-null result. |
| 614 | final public <E> E walk( Function<Node,E> pred ) { |
| 615 | assert CODE._visit.isEmpty(); |
| 616 | E rez = _walk(pred); |
| 617 | CODE._visit.clear(); |
| 618 | return rez; |
| 619 | } |
| 620 | |
| 621 | private <E> E _walk( Function<Node,E> pred ) { |
| 622 | if( CODE._visit.get(_nid) ) return null; // Been there, done that |
Tested by
no test coverage detected