Here you can find the source of toIntegerArray(List
public static int[] toIntegerArray(List<Integer> arrayValues)
//package com.java2s; /**// w ww . j a va 2 s . c om * * Copyright (c) 2016 Fannie Mae, All rights reserved. * This program and the accompany materials are made available under * the terms of the Fannie Mae Open Source Licensing Project available * at https://github.com/FannieMaeOpenSource/ezPie/wiki/License * * ezPIE? is a registered trademark of Fannie Mae * */ import java.util.List; public class Main { public static int[] toIntegerArray(List<Integer> arrayValues) { int length = arrayValues.size(); int[] result = new int[length]; for (int i = 0; i < length; i++) { result[i] = (int) arrayValues.get(i); } return result; } }