aspose file tools*
The moose likes Beginning Java and the fly likes Ordered Collection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Ordered Collection" Watch "Ordered Collection" New topic
Author

Ordered Collection

surendar prabu
Ranch Hand

Joined: Jul 24, 2006
Posts: 102
I need to maintain key-value pairs. I need to stre them in an ordered manner.say if i insert the elements as

b,B
c,C
a,A
d,D

I want to retrieve them in the same order as inserted. Also i dont want them to be sorted. I need only ordered key value pairs.
How can i achieve this?

regards,
Surendar prabu
[ August 01, 2007: Message edited by: surendar prabu ]

SCJP 1.4
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Check out the JavaDoc for LinkedHashMap.


Merrill
Consultant, Sima Solutions
surendar prabu
Ranch Hand

Joined: Jul 24, 2006
Posts: 102
Thanks Merill. I have got what i needed.
 
 
subject: Ordered Collection
 
Similar Threads
About using logic:equal
Getting session attributes
How to check against null
problem in writing Regular Expression
Problem in regular expression for matching