public static long [ ] asLongArray ( Collection collection ) { long [ ] result = new long [ collection . size ( ) ] ; int i = 0 ; for ( Object c : collection ) { result [ i ++ ] = asLong ( c ) ; } return result ; }
Make collection into a long array .