Even if the results coming out of the database are sorted, throwing
them into a non-sorted Collection, like a basic HashMap, will un-sort
them.  If you use a List, you just preserve the database sort order. 
If you use a TreeMap, you can get the same sort order, but the TreeMap
object will go through the work of sorting them all over again.


On Tue, 8 Mar 2005 09:17:49 -0500, David Johnson <[EMAIL PROTECTED]> wrote:
> my thought was just to let the DB do the work on the sorting. Is that bad?
> 
> 
> On Mon, 7 Mar 2005 21:29:08 -0700, Wendy Smoak <[EMAIL PROTECTED]> wrote:
> > From: "James Mitchell" <[EMAIL PROTECTED]>
> > > I wouldn't use a Map, I would go with a List.  Primarily for ordering.
> >
> > I use java.util.TreeMap-- automatic alphabetical order for my lists of
> > (String) codes and descriptions.
> >
> > --
> > Wendy Smoak
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> --
> -Dave
> [EMAIL PROTECTED]
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
Jeff Beal
Webmedx, Inc.
Pittsburgh, PA USA

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to