richard- i appreciate the input. i'd expect it to give back in the natural
order, the order in which i put my items. however, something else is going
on apparently. --a
-----Original Message-----
From: Richard Yee [mailto:[EMAIL PROTECTED]]
Sent: Sunday, September 23, 2001 3:47 PM
To: [EMAIL PROTECTED]
Subject: Re: Postmortem (iterate, wrap, hashtable, nested)
Ali,
You are getting the InvoiceLineItems out of order b/c you are storing them
in a Map or Hashtable. These collections do not preserve the order of the
objects as they are inserted into them. If you want to preserve the
ordering, you need to use a Collection that implements the List interface
(ArrayList, LinkedList) You could use a TreeMap or SortedMap, but these
would incur more overhead for your application than using a collection that
implements the List interface.
-Richard