>Perhaps we need to stay compatible with J2SDK 1.3.
>A lot of projects on the ASF stick to this requirement.
>BTW, in jakarta commons collections we have:
>http://jakarta.apache.org/commons/collections/apidocs-COLLECTIONS_3_0/org/a
pache/commons/collections/map/LinkedMap.html
>I am not sure if this can be used and if this works in 1.3.

Unfortunately, the LinkedMap in jakarta-commons collections has the
limitation that (extracted from the javadoc):

    "In this implementation order is maintained by original insertion."

where as the LinkedHashMap in JDK1.4+:

    "A special constructor is provided to create a linked hash map whose
order of iteration is the order in which its entries were last accessed,
from least-recently accessed to most-recently (access-order)."

Also, from the javadoc of LinkedMap:

    "This implementation improves on the JDK1.4 LinkedHashMap by adding the
MapIterator functionality, additional convenience methods and allowing
bidirectional iteration."

but it doesn't mention about the loss of the "LRU" functionality from the
JDK1.4 LinkedHashMap!

It seems to be an easy task to provide a JDK1.3 compatible version of
LinkedHashMap based on the JDK1.4 implementation.  Or does it need to be an
absolute clean-room re-implementation of the JDK1.4 LinkedHashMap
functionalities in order to avoid any licensing issue ?

Hanson

Reply via email to