List of utility methods to do List to Int List
String | listToInString(List list) list To In String if (list == null || list.size() == 0) return null; StringBuffer buf = new StringBuffer(); for (int i = 0; i < list.size(); i++) { Object obj = list.get(i); if (obj != null && obj.toString().length() != 0) { if (i != 0) buf.append(", "); ... |
int[] | listToIntArray(final List list To Int Array final int[] result = new int[ints.size()]; for (int i = 0; i < result.length; i++) { result[i] = ints.get(i); return result; |
int[] | listToIntArray(List l) list To Int Array int[] foo = new int[l.size()]; int count = 0; Iterator iter = l.iterator(); while (iter.hasNext()) { foo[count++] = ((Integer) iter.next()).intValue(); return foo; |
int[] | listToIntArray(List Take a list of number objects and return an int[] array int[] newArray = new int[list.size()]; for (int i = 0; i < list.size(); i++) { newArray[i] = list.get(i).intValue(); return newArray; |
Integer[][][] | listToIntegerArray(List list) list To Integer Array Integer[][][] str = new Integer[list.size()][][]; ArrayList a, b; for (int i = 0; i < list.size(); i++) { a = (ArrayList) list.get(i); str[i] = new Integer[a.size()][]; for (int m = 0; m < a.size(); m++) { b = (ArrayList) a.get(m); str[i][m] = new Integer[b.size()]; ... |
int[] | toIntArray(final List extends Number> numbers) to Int Array final int[] ints = new int[numbers.size()]; for (int i = 0; i < ints.length; i++) { final Number number = numbers.get(i); ints[i] = number.intValue(); return ints; |
int[] | toIntArray(final List to Int Array return toIntArray(list, -1);
|
int[] | toIntArray(final List to Int Array int[] array = new int[list.size()]; for (int i = 0; i < list.size(); i++) { array[i] = list.get(i); return array; |
int[] | toIntArray(final List Convert integer list to array. int[] ret = new int[list.size()]; int pos = 0; for (Integer it : list) { ret[pos] = it.intValue(); ++pos; return ret; |
int[] | toIntArray(java.util.List to Int Array int[] ret = new int[list.size()]; int i = 0; for (Integer e : list) ret[i++] = e.intValue(); return ret; |