Object[] (Hashtable<?, ?> tmp) { Object[] array = new Object[tmp.size() * 2]; int j = 0; for (Object o : <warning descr="Iteration over 'tmp.keySet()' may be replaced with 'entrySet()' iteration">tmp.keySet()</warning>) { array[j] = o; array[j + 1] = tmp.get(o); j += 2; } return array; }