public static int [ ] toIntArray ( Collection < Integer > items ) { int [ ] result = new int [ items . size ( ) ] ; int i = 0 ; for ( Integer v : items ) { result [ i ++ ] = v ; } return result ; }
Convert a collection of Integers into an int array .