commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Colebourne" <>
Subject [collections] HashedMap and subclasses
Date Sat, 06 Dec 2003 16:32:32 GMT
A number of new classes now form a hierarchy in the map subpackage:

HashedMap (general hash map)

IdentityMap extends HashedMap  (uses ==)

LinkedMap extends HashedMap  (insertion order)

LRUMap extends LinkedMap  (access order, drops oldest)

Is everyone happy with this hierarchy?
Should LRUMap (access order) extend LinkedMap (insertion order) (lots of
code shared)?
Should there be an AbstractHashedMap class, rather than all extending

We're going to have to live with this so it needs to be right.....;-)

Also, should caching and reusing of previous MapEntry objects be part of the
default implementations?

Finally, I think that StaticBucketMap and ReferenceMap don't benefit from
extending HashedMap, but if someone wants to confirm or deny this they're
most welcome :-0


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

View raw message