public Object[] toArray() {
// Since we don't ordinarily have distinct Entry objects, we
// must pack elements using exportable SimpleEntry
Collection c = new ArrayList(size());
for (Iterator i = iterator(); i.hasNext(); )
c.add(new SimpleEntry((Entry)i.next()));
return c.toArray();
}