You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Szegedi, Attila" <sz...@scriptum.hu> on 2000/08/10 12:53:07 UTC

RE: Hashtable keys() and elements() order [Was: Question aboutSelect /Options tag]

It will typically iterate the underlying array, (and each array element can
also have a "next" reference, turning it into a linked list).
Given that hashing depends on the capacity, even the same entries put in a
table of different capacity will be returned in different order.

Attila.

> -----Original Message-----
> From: John Tangney [mailto:jtangney@knowledgeplanet.com]
> Sent: Wednesday, August 09, 2000 10:35 PM
> To: struts-user@jakarta.apache.org
> Subject: Re: Hashtable keys() and elements() order [Was:
> Question aboutSelect /Options tag]
>
>
> My guess is that it's not specified, but you can always look
> at the code for
> java.util.Hashtable and see. I wouldn't rely on it if I were you...
>
> --johnt
>
>
> > Does anyone know whether or not the keys() and elements()
> methods of a
> > Hashtable enumerate things in the same order?
>