public static int[] setToArray(final Set<Integer> set) {
		final int length = set.size();
		final Iterator<Integer> it = set.iterator();
		final int[] temp = new int[length];
		int index = 0;
		while(it != null && it.hasNext()) {
			temp[index] = it.next();
			index++;
		}
		return temp;
	}