public void sort ( ) { List < DapNode > sorted = new ArrayList < DapNode > ( ) ; sortR ( this , sorted ) ; // Assign indices for ( int i = 0 ; i < sorted . size ( ) ; i ++ ) { sorted . get ( i ) . setIndex ( i ) ; } this . nodelist = sorted ; }
Sort the nodelist into prefix left to right order