Daniel Rall wrote:

> 
> I saw all the the the following name suggestions in this thread, but
> like SequencedHashMap the most.  However, the class currently extends
> Hashtable, and HashMap is non-sync'd...

Is it possible to write it in such a way that you use the un-synced
HashMap class , and then just use the methods in the
java.util.Collections class if you want a thread-safe version? 
(Thinking of Collections.synchronizedMap(Map))

That would seem to solve the need for a thread-safe and "couldn't care
less" version. Are there methods on the class that aren't in the Map
interface, or is it just the implementation that is different? If the
latter, then the only overhead in producing a synchronized SequencedMap
(new name? ;) would be in the construction.

so unsafe use:

        private SequencedMap myMap = new SequencedMap();

or for synched
        private SequencedMap mySafeMap = Collections.synchronizedMap (new
SequencedMap() );

??

Jari

--
Jari Worsley
Senior Programmer
Hyperlink Interactive Ltd

Reply via email to