@Override public Iterator<Pair<NodeId, Node>> all() { if ( false ) testForConsistency() ; return baseTable.all() ; }
@Override public Iterator<Pair<NodeId, Node>> all() { return nodeTable.all() ; }
@Override public Iterator<Pair<NodeId, Node>> all() { info("all()") ; return nodeTable.all(); }
public static void print(String label, NodeTable nodeTable) { if ( label != null ) System.out.println(label) ; Iterator<Pair<NodeId, Node>> iter = nodeTable.all() ; for ( ; iter.hasNext() ; ) { Pair<NodeId, Node> x = iter.next() ; NodeId nodeId = x.getLeft() ; Node node = x.getRight() ; System.out.println(nodeId+" "+node) ; } } }
public static void dumpNodeTable(NodeTable nodeTable, Set<NodeTable> dumpedNodeTables) { if ( dumpedNodeTables.contains(nodeTable) ) return ; Iterator<Pair<NodeId, Node>> iter = nodeTable.all() ; for ( ; iter.hasNext() ; ) { Pair<NodeId, Node> pair = iter.next() ; NodeId nid = pair.car() ; Node n = pair.cdr(); String x = NodeFmtLib.displayStr(n) ; System.out.printf("%016X %s\n", nid.getId(), x) ; } dumpedNodeTables.add(nodeTable) ; }