Android Utililty Methods Collection to Array Convert

List of utility methods to do Collection to Array Convert

Description

The list of methods to do Collection to Array Convert are organized into topic(s).

Method

String[]toArray(Collection collection)
to Array
return collection.toArray(new String[collection.size()]);
long[]toPrimitiveLongArray(Collection collection)
to Primitive Long Array
final int size = collection.size();
final long[] ret = new long[size];
int i = 0;
for (Long value : collection) {
    ret[i++] = value;
return ret;