static int [ ] uniquify ( int [ ] ints ) { IntSet iset = new IntSet ( ) ; for ( int i : ints ) { iset . add ( i ) ; } return iset . toIntArray ( ) ; }
Returns a sorted copy of an integer array with duplicate values removed .