[concurrency-interest] About LinkedHashMap
jhu at glog.com
Fri Oct 14 16:30:27 EDT 2005
I know this is an off-topic question to post here, but I did struggling
to find the right way to use this class, and I know there are lot of
experts in this mail list. I would appreciate it very much on this if
you could throw some lights.
Suppose I have a DataBlock which contains a list of DataElement, and I
have a HashMap which basically acts a hash index to quickly identify the
DataElement according to a given key. Now, if I get the element and I
want to find the next element very quickly, but it seems to me that
current Collection API does not provide a quick solution to this, it
appears that I have to link the DataElement by myself to achieve this.
LinkedHashMap seems a promising solution to this problem, but it does
not provide a public method to get the entry, it only guarantees the
order of insertion or access.
More information about the Concurrency-interest