public void removeSamePackage ( String pkg ) { Iterator < String > i = _imports . iterator ( ) ; while ( i . hasNext ( ) ) { String name = i . next ( ) ; if ( name . startsWith ( pkg ) && name . indexOf ( ' ' , pkg . length ( ) + 1 ) == - 1 ) { i . remove ( ) ; } } }
Remove all classes that are in the same package .