public static int[] convertArrayListToIntArray(ArrayList<Integer> list)
	{
		int[] ret = new int[list.size()];
	    Iterator<Integer> iterator = list.iterator();
	    
	    for (int i = 0; i < ret.length; i++)
	        ret[i] = iterator.next().intValue();

	    return ret;
	}