This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
I am looking for a data structure which is like a Map. I have used different classes from the standard api that implement the Map interface. All of them seem to move the data after its been added to the Map. TreeMap sorts according to the keys and HashMap hashes the keys. I am looking for a Map that stores the data in the same sequence as it was added, and also supports standard Map methods.
Why do they have to be in the same order? As far as I know there's no maps that don't sort in some manner. You could use an ArrayList and have every other element be the key for the following elements value. Then by finding the indexOf your key and adding 1 you would find the value as well. [ August 04, 2003: Message edited by: Ken Blair ]