I think it can be used as a direct LL substitute now. I don't agree that it needs to extend LinkedList. My reason is that someone would have to change at least one line of code, where the thing is declared and/or allocated, anyway. Also, if someone is using a LinkedList as a LinkedList (instead of a List) they're doing things wrong anyway. The main point of the Collections API is the interfaces. I dunno if that makes me a prig or a purist... ;0) I will make a new version that extends LinkedList and see how I like it.
Actually, it looks like I lied earlier when I said that it was exactly like LinkedList except for the node caching. It looks like somewhere along the way I changed the contract of the getXXX methods to stop throwing NoSuchElementException. I agree that that should be changed back to support better integration into existing code. Can you tell me more about the unit testing? Thanks, Jeff --- Stephen Colebourne <[EMAIL PROTECTED]> wrote: > I am broadly in favour of this class. However, > - I would like to see it extend LinkedList, so it can be used as a direct LL > substitute > - This then implies changes to the logic in certain methods (eg.getFirst(), > getLast()) > - I would like to see unit tests (There is a structure for unit tests, that > means that you need to write very little as the superclass of the test does > all the work of comparing against the List spec.) > > Stephen > > ----- Original Message ----- > From: "Jeff Varszegi" <[EMAIL PROTECTED]> > To: "Jakarta Commons Developers List" <[EMAIL PROTECTED]>; > <[EMAIL PROTECTED]> > Sent: Friday, November 15, 2002 4:23 PM > Subject: [collections][SUBMIT]A faster linked list > > > > NodeCachingLinkedList is identical to LinkedList except in that it > maintains an internal node > > cache so it doesn't have to create new ones as often. > > > > Jeff > > > > > > __________________________________________________ > > Do you Yahoo!? > > Yahoo! Web Hosting - Let the expert host your site > > http://webhosting.yahoo.com > > > ---------------------------------------------------------------------------- > ---- > > > > -- > > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > __________________________________________________ Do you Yahoo!? Yahoo! Web Hosting - Let the expert host your site http://webhosting.yahoo.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>