Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 81517 invoked from network); 7 Nov 2003 03:50:24 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 7 Nov 2003 03:50:24 -0000 Received: (qmail 70701 invoked by uid 500); 7 Nov 2003 03:50:02 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 70644 invoked by uid 500); 7 Nov 2003 03:50:02 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 70631 invoked from network); 7 Nov 2003 03:50:01 -0000 Received: from unknown (HELO gonzo.weaselworks.com) (67.80.93.108) by daedalus.apache.org with SMTP; 7 Nov 2003 03:50:01 -0000 Received: from [192.168.1.102] (helo=trilobyte) by gonzo.weaselworks.com with esmtp (Exim 4.12) id 1AHxXv-00069R-00; Thu, 06 Nov 2003 22:44:27 -0500 From: "Lee Crawford" To: Cc: Subject: [collections] review of the collections/iterator package. Date: Thu, 6 Nov 2003 22:50:13 -0500 Message-ID: <003501c3a4e2$3fefcc30$6601a8c0@trilobyte> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Greetings. In advance of submitting a collection of iterator-related classes, I thought I'd review what was already in the org.apache.commons.collections.iterators package to ensure my components would fit in. I wanted to share my observations and try and discuss some of the areas that I had an opinion on. 1) It seems like the ProxyIterator class should be more of a base interface for Iterators that have embedded, accessible Iterators in them. Many of the classes in the package would implement this interface. A ProxyIteratorImpl or AbstractProxyIterator class could be provided as a concrete implementation. 2) The same thing could be said for the ProxyListIterator class. 3) If you didn't agree with the above and ProxyIterator and ProxyListIterator remain concrete classes, why don't all of the delegating Iterators in the package extend these base classes? For ProxyIterator you've got AbstractIterator, UnmodifiableIterator, TransformIterator, etc. 4) In the case of ProxyListIterator why don't the classes like AbstractListIterator, UnmodifiableListIterator, etc. extend it? 5) The AbstractListIterator class seems to do the same exact thing as ProxyListIterator? 6) The AbstractIterator class seems to do the same thing as ProxyIterator? Also, it seems to be functionally duplicated in the ../decorators package. 7) Why isn't there a ProxyMapIterator class similar to the ProxyIterator and ProxyListIterator classes? 8) If there was then UnmodifiableMapIterator should extend it. 9) Why doesn't the SingletonListIterator class extend SingletonIterator instead of reimplementing the base functionality? Any comments, explanations, etc. greatly appreciate. Thanks all. --lee --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org