Return-Path: Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 97609 invoked from network); 18 Sep 2003 17:12:49 -0000 Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by daedalus.apache.org with SMTP; 18 Sep 2003 17:12:49 -0000 Received: (qmail 15019 invoked by uid 1304); 18 Sep 2003 17:12:56 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 18 Sep 2003 17:12:56 -0000 Date: Thu, 18 Sep 2003 10:12:56 -0700 (PDT) From: Rodney Waldhoff To: Jakarta Commons Developers List Subject: Re: [collections] deprecate CursorableLinkedList? In-Reply-To: <002301c37e07$54a20140$6bb6769b@NAMRAC2247> Message-ID: <20030918100908.S12449@minotaur.apache.org> References: <20030918095208.R99940@minotaur.apache.org> <002301c37e07$54a20140$6bb6769b@NAMRAC2247> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: localhost 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Thu, 18 Sep 2003 james@carmanconsulting.com wrote: > If I append something asynchronously to the end of the list while a Cursor > is open, will the cursor pick that up? Yes. > Or, does a cursor merely take a > snap-shot of the underlying list and iterate over whatever is there > currently? No. Not a snapshot. If I remember correctly, CursorableLinkedList is a doubly linked list. The cursor maintains a reference to some node in that list. If you muck around with any other node, the Cursor doesn't care, indeed it doesn't really know. The only tricky bit is when you want to remove the node that the cursor is currently sitting on, in which case the cursor slides forward. > Just curious. Sure. No problem.