This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ordered Collection

 
surendar prabu
Ranch Hand
Posts: 102
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out the JavaDoc for LinkedHashMap.
 
surendar prabu
Ranch Hand
Posts: 102
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Merill. I have got what i needed.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic