List of utility methods to do List to Int List
int[] | toIntegerArray(List to Integer Array int length = arrayValues.size(); int[] result = new int[length]; for (int i = 0; i < length; i++) { result[i] = (int) arrayValues.get(i); return result; |
int[] | toIntegerArray(List Creates an array of type int[] from a list of instances of class Integer. int ret[] = new int[values.size()]; for (int i = 0; i < ret.length; i++) ret[i] = values.get(i); return ret; |
List | toIntegerList(final E[] array) to Integer List List<Integer> integerList = null; if (array != null) { integerList = new ArrayList<Integer>(array.length); for (E e : array) { if (e != null) { try { integerList.add(Integer.parseInt(e.toString())); } catch (NumberFormatException nfe) { ... |
List | toIntegerList(int... array) to Integer List List<Integer> list = new ArrayList<>(array.length); for (int item : array) list.add(item); return list; |
List | toIntegerList(int[] array) to Integer List List<Integer> list = new ArrayList<Integer>(array.length); for (int el : array) list.add(el); return list; |
List | toIntegerList(int[] intArray) Convert the given int array to an integer list List<Integer> integerList = new ArrayList<Integer>(intArray.length); for (int currInt : intArray) { integerList.add(currInt); return integerList; |
List | toIntegerList(List Parse a list of String into a list of Integer. List<Integer> intList = new ArrayList<Integer>(); for (String str : strList) { try { intList.add(Integer.parseInt(str)); } catch (NumberFormatException nfe) { if (failOnException) { return null; } else { ... |
List | toIntegers(final List Converts a list of Longs to Integers final List<Integer> ints = new ArrayList<>(); for (final Long lng : longs) { ints.add(lng.intValue()); return ints; |
List | toIntegers(List to Integers if (values == null) { return null; List<Integer> integerValues = new ArrayList<Integer>(values.size()); for (int index = 0; index < values.size(); index++) { String value = values.get(index); Integer integerValue = toInteger(value); integerValues.add(integerValue); ... |
List | toIntList(List to Int List List<Integer> result = new ArrayList<Integer>(); for (String str : list) { result.add(fromIntString(str)); return result; |