Android Utililty Methods List to Array Convert

List of utility methods to do List to Array Convert

Description

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

Method

byte[]toByteArray(final List pItems)
to Byte Array
final byte[] out = new byte[pItems.size()];
for (int i = out.length - 1; i >= 0; i--) {
    out[i] = pItems.get(i);
return out;
char[]toCharArray(final List pItems)
to Char Array
final char[] out = new char[pItems.size()];
for (int i = out.length - 1; i >= 0; i--) {
    out[i] = pItems.get(i);
return out;
double[]toDoubleArray(final List pItems)
to Double Array
final double[] out = new double[pItems.size()];
for (int i = out.length - 1; i >= 0; i--) {
    out[i] = pItems.get(i);
return out;
float[]toFloatArray(final List pItems)
to Float Array
final float[] out = new float[pItems.size()];
for (int i = out.length - 1; i >= 0; i--) {
    out[i] = pItems.get(i);
return out;
int[]toIntArray(final List pItems)
to Int Array
final int[] out = new int[pItems.size()];
for (int i = out.length - 1; i >= 0; i--) {
    out[i] = pItems.get(i);
return out;
long[]toLongArray(final List pItems)
to Long Array
final long[] out = new long[pItems.size()];
for (int i = out.length - 1; i >= 0; i--) {
    out[i] = pItems.get(i);
return out;
short[]toShortArray(final List pItems)
to Short Array
final short[] out = new short[pItems.size()];
for (int i = out.length - 1; i >= 0; i--) {
    out[i] = pItems.get(i);
return out;