private boolean sortedAndUnique ( String [ ] keyList , int size ) throws IOException { if ( ! closed ) { for ( int i = 1 ; i < size ; i ++ ) { if ( keyList [ ( i - 1 ) ] . compareTo ( keyList [ i ] ) >= 0 ) { return false ; } } return true ; } else { throw new IOException ( "already closed" ) ; } }
Sorted and unique .