public static int [ ] asIntegerArray ( Collection collection ) { int [ ] result = new int [ collection . size ( ) ] ; int i = 0 ; for ( Object c : collection ) { result [ i ++ ] = asInteger ( c ) ; } return result ; }
Make collection into an integer array .