public static < T > T [ ] toArray ( Iterable < ? extends T > iterable , T [ ] target ) { if ( iterable instanceof Collection ) { return ( ( Collection < T > ) iterable ) . toArray ( target ) ; } if ( iterable instanceof RichIterable ) { return ( ( RichIterable < T > ) iterable ) . toArray ( target ) ; } MutableList < T > result = Lists . mutable . empty ( ) ; Iterate . addAllTo ( iterable , result ) ; return result . toArray ( target ) ; }
Copies the specified iterable into the specified array .