commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arun Thomas" <>
Subject RE: [collections] New Collection
Date Fri, 12 Sep 2003 17:19:03 GMT

That seems to be a good interpretation of the original intent.  Should have read the original
a little better the first time.  


-----Original Message-----
From: [] 
Sent: Friday, September 12, 2003 9:13 AM
Subject: Re: [collections] New Collection

The only problem with SequencedHashMap is that its ordering is based upon the insertion order,
not the values of the objects added to it or some Comparator, such as is needed (at least
that's how I interpret "ordering by value" from the original requirements).

----- Original Message ----- 
From: "Arun Thomas" <>
To: "Jakarta Commons Developers List" <>
Sent: Friday, September 12, 2003 12:04 PM
Subject: RE: [collections] New Collection

You might want to take a look at org.apache.commons.collections.SequencedHashMap which combines,
for the most part, the functions of list and map (insertElementAt()) is not available - how
does one insert a key, when the value should be at a specific position?

The transactional support is definitely not there, but this might give you a better starting
point for what you desire.


-----Original Message-----
From: Oxley, David []
Sent: Friday, September 12, 2003 8:07 AM
To: ''
Subject: [collections] New Collection

Our application has just changed from requiring JDK 1.1 to JDK 1.3 as a minimum. As a result
we are looking at switching our implementation of using Hashtable and Vector to using collections.

I am going to write a new collection that gives the functionality we require and once I've
finished I want to donate it to commons-collections. I would like some comments on where to
start (especially as I don't yet know too much about the standard collections API's). The
functionality I require is
this: 1. Keys and values. ala Hashtable. 2. Ordering by value. ala Vector. 3. Indexing by
value. ala Vector's indexOf, elementAt and insertElementAt. 4. Transactions. i.e. Others won't
see changes until commit is called.

I take it there is no implementation that supplies the above. I was initially thinking of
either encapsulating or overriding TreeMap, but I think that would make the indexing part
pretty difficult. But now I think I will just encapsulate or override HashMap.

Any comments would be gratefully received.


This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs.
For more information on a proactive anti-virus service working around the clock, around the
globe, visit: ________________________________________________________________________

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message