commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Colebourne" <>
Subject Re: [collections] [patch] NodeCachingLinkedList
Date Sat, 14 Dec 2002 09:24:12 GMT
Thanks, although I'm a little confused ;-)

What benefit does CommonsLinkedList give? A NodeCachingLinkedList class is
allowed to subclass LinkedList directly. The licencing issue was that some
of the methods in NodeCachingLinkedList were copied verbatim, especially
noted in the javadoc. A reimplementation of NodeCachingLinkedList that
directly extends LinkedList would be fine (written solely from the
spec/idea, no copied code), unless CommonsLinkedList gives us something
extra. I feel like I've missed something!


----- Original Message -----
From: "Rich Dougherty" <>
To: <>
Sent: Saturday, December 14, 2002 7:03 AM
Subject: [collections] [patch] NodeCachingLinkedList

> (I'm reposting this, since I sent the original over eight hours ago and it
> hasn't shown up here. Apologies if you get it twice.)
> Hi
> Here is a patch to resolve the license issues with
> NodeCachingLinkedList. Included in this patch is:
> - CommonsLinkedList, a version of java.util.LinkedList that we can
>   distribute with [collections].
>   A few points about this class:
>   - Is the name ok? I couldn't think of anything else to distinguish
>     it from the standard implementation.
>   - It is package visible, perhaps it should be public.
>   - It extends LinkedList rather than AbstractSequentialList. Since it
>     doesn't override every method of List there will be problems if
>     LinkedList overrides more methods in the future. (This was a
>     problem with the old implementation of NodeCachingLinkedList too.)
>     Also, extending LinkedList takes up a little bit more memory.
>   - It will probably be a little slower than LinkedList since I have
>     made an effort to break out common code rather than inlining
>     everything. However, the difference should be very small.
> - NodeCachingLinkedList which overrides several of CommonsLinkedList
>   methods to allow caching of nodes. Jeff may wish to look at this to
>   see if I've written it correctly. Of particular note, I have changed
>   the default maximum cache size from 1000000 down to 20.
> - TestLinkedList, for testing classes that extend LinkedList. Being
>   able to write this class is one good reason for CommonsLinkedList to
>   extend LinkedList.
> - Tests for CommonsLinkedList and NodeCachingLinkedList.
> - Serialized versions of CommonsLinkedList and NodeCachingLinkedList
>   that can be placed in data/test.
> - Patch to TestObject.getCompatibilityVersion() to use a String
>   version instead of an int version. This allows version strings like
>   "2.1" or "2.2". This also required changes to several other test
>   cases which overrode the method.
> Rich


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

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

View raw message