private void sort ( List < ClassDoc > list ) { List < ClassDoc > classes = new ArrayList < ClassDoc > ( ) ; List < ClassDoc > interfaces = new ArrayList < ClassDoc > ( ) ; for ( int i = 0 ; i < list . size ( ) ; i ++ ) { ClassDoc cd = list . get ( i ) ; if ( cd . isClass ( ) ) { classes . add ( cd ) ; } else { interfaces . add ( cd ) ; } } list . clear ( ) ; list . addAll ( classes ) ; list . addAll ( interfaces ) ; }
Sort the given mixed list of classes and interfaces to a list of classes followed by interfaces traversed . Don t sort alphabetically .