public static int[] toArray(LinkedList<Integer> integerList) {
	    int[] integers = new int[integerList.size()];
	    int i = 0;
	    for (int x : integerList)
	        integers[i++] = x;

	    return integers;
	}