public void adjustNodes(java.util.List<Address> v) {
        Node n;
        boolean removed=false;

        synchronized(nodes) {
            for(int i=0; i < nodes.size(); i++) {
                n=nodes.get(i);
                if(!v.contains(n.addr)) {
                    System.out.println("adjustNodes(): node " + n + " was removed");
                    nodes.remove(n);
                    removed=true;
                }
            }
            if(removed)
                repaint();
        }
    }
public void adjustNodes ( java . util . List < Address > v ) { Node n ; boolean removed = false ; synchronized ( nodes ) { for ( int i = 0 ; i < nodes . size ( ) ; i ++ ) { n = nodes . get ( i ) ; if ( ! v . contains ( n . addr ) ) { System . out . println ( "adjustNodes(): node " + n + " was removed" ) ; nodes . remove ( n ) ; removed = true ; } } if ( removed ) repaint ( ) ; } }
Removes nodes that are not in the view