[WAY OT] Hashtable implementation

2003-05-30 Thread Denis Avdic
Hey, I know this is probably a really stupid question but i am looking for a Hashtable (or similar) that will store multiple objects under the same key. I wrote a superficial implementation myself (put, size and get methods only) based on the Hashtable, but I am interested to know if there is

Re: [WAY OT] Hashtable implementation

2003-05-30 Thread David Graham
Hashtable is a legacy collection that has been replaced by the HashMap class. You might check commons-collections for such a class and if it's not there you could contribute the code. David Hey, I know this is probably a really stupid question but i am looking for a Hashtable (or similar)

Re: [WAY OT] Hashtable implementation

2003-05-30 Thread Paul Curren
Hi there, If you want multiple objects under the same key then essentially you are just looking for a generic list/collection or whatever you want to call it. No? Or perhaps there are to be multiple lists - a Map containing entries that are Collections then I guess. Paul C Denis Avdic

Re: [WAY OT] Hashtable implementation

2003-05-30 Thread Denis Avdic
Well, if its a map, it helps sorting. I take all elements under one key, dump them into the bucket under that key, then get a list of all keys and sort the keys only. So if you have (lets say) 10 users, and there are only 365 possible birthdays, it is much faster to sort 356 than 10.

RE: [WAY OT] Hashtable implementation

2003-05-30 Thread Mark Galbreath
Message- From: Denis Avdic [mailto:[EMAIL PROTECTED] Sent: Thursday, May 29, 2003 3:24 PM To: Struts Users Mailing List Subject: Re: [WAY OT] Hashtable implementation Well, if its a map, it helps sorting. I take all elements under one key, dump them into the bucket under that key, then get

RE: [WAY OT] Hashtable implementation

2003-05-30 Thread Chenna Yenuguvenkata
be sorted in ascending order. Mark -Original Message- From: Denis Avdic [mailto:[EMAIL PROTECTED] Sent: Thursday, May 29, 2003 3:24 PM To: Struts Users Mailing List Subject: Re: [WAY OT] Hashtable implementation Well, if its a map, it helps sorting. I take all elements under one key, dump them

Re: [WAY OT] Hashtable implementation

2003-05-30 Thread Denis Avdic
will also be sorted in ascending order. Mark -Original Message- From: Denis Avdic [mailto:[EMAIL PROTECTED] Sent: Thursday, May 29, 2003 3:24 PM To: Struts Users Mailing List Subject: Re: [WAY OT] Hashtable implementation Well, if its a map, it helps sorting. I take all elements under one

RE: [WAY OT] Hashtable implementation

2003-05-30 Thread Mark Galbreath
! Mark -Original Message- From: Denis Avdic [mailto:[EMAIL PROTECTED] Sent: Thursday, May 29, 2003 4:25 PM To: Struts Users Mailing List Subject: Re: [WAY OT] Hashtable implementation Well, I want to be able to add one object at a time, and remove them one at a time as well

RE: [WAY OT] Hashtable implementation

2003-05-30 Thread Mark Galbreath
Yes. It's called a multi-dimensional array. Mark -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Thursday, May 29, 2003 3:00 PM To: [EMAIL PROTECTED] Subject: Re: [WAY OT] Hashtable implementation Hashtable is a legacy collection that has been replaced

RE: [WAY OT] Hashtable implementation

2003-05-30 Thread Mark Galbreath
Lots of testes on the list today! Well...have a ball! -Original Message- From: Chenna Yenuguvenkata [mailto:[EMAIL PROTECTED] Sent: Thursday, May 29, 2003 4:14 PM To: Struts Users Mailing List Subject: RE: [WAY OT] Hashtable implementation testing At 04:11 PM 5/29/2003 -0400, you