@override bool visit(T n) { if (cycleNodes.contains(n)) { // skip any nodes on a known cycle. return true; } return super.visit(n); }