3 Replies - 414 Views - Last Post: 29 July 2009 - 05:34 PM Rate Topic: -----

#1 bibhash69  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 29-July 09

HaspMap Data retrivial in same seqence of Inserting

Post icon  Posted 29 July 2009 - 06:46 AM

Hi All,

I have a haspMap, their I put some data in some sequence say (10,5,15,20,25 as key and corresponding values)
Now, I need to iterate through the HaspMap and I need the data in the same sequence as I have put.
I am using HaspMap.

My question : Is it possible ? If possible, tell me the procedure.
Is This A Good Question/Topic? 0
  • +

Replies To: HaspMap Data retrivial in same seqence of Inserting

#2 Guest_Neumann*


Reputation:

Re: HaspMap Data retrivial in same seqence of Inserting

Posted 29 July 2009 - 09:53 AM

No, this is not possible.
Was This Post Helpful? 0

#3 g00se  Icon User is online

  • D.I.C Lover
  • member icon

Reputation: 2553
  • View blog
  • Posts: 10,641
  • Joined: 20-September 08

Re: HaspMap Data retrivial in same seqence of Inserting

Posted 29 July 2009 - 03:46 PM

Yes. Use LinkedHashMap
Was This Post Helpful? 0
  • +
  • -

#4 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8315
  • View blog
  • Posts: 31,836
  • Joined: 06-March 08

Re: HaspMap Data retrivial in same seqence of Inserting

Posted 29 July 2009 - 05:34 PM

View PostNeumann, on 29 Jul, 2009 - 08:53 AM, said:

No, this is not possible.

G00se might surprise you :D
But in that case, G00se, I am surprise, why using an HashMap ? Just to garantee unicity ?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1