The list of methods to do ArrayList to Array are organized into topic(s).
byte[]
byteArrayListToByteArray(ArrayList indata) byte Array List To Byte Array
byte[] temp = new byte[indata.size()];
for (int i = 0; i < temp.length; i++)
temp[i] = (byte) indata.get(i).byteValue();
return temp;
Long[]
convertIntArrayList2array(ArrayList alInput) A utility method to convert ArrayList to int[]
Long[] outputNodeIndices = new Long[alInput.size()];
int j = 0;
for (Iterator i = alInput.iterator(); i.hasNext(); j++) {
outputNodeIndices[j] = ((Long) i.next()).longValue();
return (outputNodeIndices);
String[]
convertStringArrayListToArray(ArrayList al) convert String Array List To Array
String[] temp = al.toArray(new String[0]);
String[] list = new String[temp.length];
System.arraycopy(temp, 0, list, 0, temp.length);
return list;
double[]
doubleArrayList2Array(ArrayList a) double Array List Array
int num = a.size();
double[] result = new double[num];
for (int i = 0; i < num; i++)
result[i] = ((Double) a.get(i)).doubleValue();
return result;
int[]
listToArray(ArrayList tempList) list To Array
if (tempList.size() == 0) {
return null;
int[] tempArray = new int[tempList.size()];
for (int i = 0; i < tempList.size(); i++) {
tempArray[i] = tempList.get(i);
return tempArray;
...
int[]
listToIntArray(ArrayList list) list To Int Array
int size = list.size();
int[] result = new int[size];
for (int i = 0; i < size; i++) {
result[i] = ((Integer) list.get(i)).intValue();
return result;