Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 55178 invoked from network); 18 Aug 2003 23:43:18 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 18 Aug 2003 23:43:18 -0000 Received: (qmail 18734 invoked by uid 97); 18 Aug 2003 23:46:08 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@nagoya.betaversion.org Received: (qmail 18727 invoked from network); 18 Aug 2003 23:46:07 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 18 Aug 2003 23:46:07 -0000 Received: (qmail 54987 invoked by uid 500); 18 Aug 2003 23:43:17 -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 54973 invoked from network); 18 Aug 2003 23:43:17 -0000 Received: from tungsten.btinternet.com (194.73.73.81) by daedalus.apache.org with SMTP; 18 Aug 2003 23:43:17 -0000 Received: from host81-128-59-45.in-addr.btopenworld.com ([81.128.59.45] helo=oemcomputer) by tungsten.btinternet.com with smtp (Exim 3.22 #23) id 19otel-0006Rr-00 for commons-dev@jakarta.apache.org; Tue, 19 Aug 2003 00:43:23 +0100 Message-ID: <003401c365e2$c2588020$2d3b8051@oemcomputer> From: "Stephen Colebourne" To: "Jakarta Commons Developers List" References: <1222FCD0-D1D4-11D7-8DF4-000393D4E360@manjiro.net> Subject: Re: [collections] CollectionDelegate Date: Tue, 19 Aug 2003 00:45:08 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N You will find classes like this already on the CVS in [collections] decorator subpackage, named Abstract*. Note that they have not yet been released. Stephen ----- Original Message ----- From: "Takuya Murata" > Hello, everyone. I am new to here. > > I have some Java classes I think it is nice that commons include. They > are classes acting like AbstractCollection but actual implementation > can be done in places other than its superclass. > > Client code looks like: > > public class Menu extends CollectionDelegate { > private MenuImp imp; > > private Menu (MenuImp imp) { > super (imp.collection ()); > this.imp = imp; > } > > public Menu () { > Menu (Util.getMenuImp ()); > } > } > > As you see, collection is defined in somewhere and the implementation > is acquired through imp.collection (). > > The implementation of CollectionDelegate is simple and straightforward; > as the name says, all methods defined in Collection interface is > forwarded into > > Likewise, ListCollection and similar delegate corresponding each > collection interface should defined as well. > > Hope this proposal sounds useful. > > Takuya Murata > takusi@manjiro.net > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-dev-help@jakarta.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org