Return-Path: Delivered-To: apmail-incubator-chemistry-dev-archive@minotaur.apache.org Received: (qmail 43301 invoked from network); 9 Sep 2010 15:25:05 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 9 Sep 2010 15:25:05 -0000 Received: (qmail 58734 invoked by uid 500); 9 Sep 2010 15:25:03 -0000 Delivered-To: apmail-incubator-chemistry-dev-archive@incubator.apache.org Received: (qmail 57676 invoked by uid 500); 9 Sep 2010 15:25:01 -0000 Mailing-List: contact chemistry-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: chemistry-dev@incubator.apache.org Delivered-To: mailing list chemistry-dev@incubator.apache.org Received: (qmail 57093 invoked by uid 99); 9 Sep 2010 15:25:00 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Sep 2010 15:25:00 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of david.caruana@alfresco.com designates 88.151.129.23 as permitted sender) Received: from [88.151.129.23] (HELO mx-out-manc3.simplymailsolutions.com) (88.151.129.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Sep 2010 15:24:38 +0000 Received: from zimbra.alfresco.com ([10.2.10.4]) by mx-out-manc3.simplymailsolutions.com (8.14.1/8.14.1) with ESMTP id o89FOHu1019206 for ; Thu, 9 Sep 2010 16:24:17 +0100 Received: from localhost (localhost.localdomain [127.0.0.1]) by zimbra.alfresco.com (Postfix) with ESMTP id 50D7641402E for ; Thu, 9 Sep 2010 16:24:17 +0100 (BST) X-Virus-Scanned: amavisd-new at unx-d-manc4.tc.ifeltd.com Received: from zimbra.alfresco.com ([127.0.0.1]) by localhost (zimbra.alfresco.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 73diK4Bj+aDE for ; Thu, 9 Sep 2010 16:24:16 +0100 (BST) Received: from [10.240.8.135] (unknown [194.75.202.163]) (Authenticated sender: david.caruana) by zimbra.alfresco.com (Postfix) with ESMTP id 98E9441401D for ; Thu, 9 Sep 2010 16:24:15 +0100 (BST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1081) Subject: Re: various small cleanups From: David Caruana In-Reply-To: Date: Thu, 9 Sep 2010 16:24:14 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <656BAC85-27CB-4687-A524-F0C52421FC86@alfresco.com> References: To: chemistry-dev@incubator.apache.org X-Mailer: Apple Mail (2.1081) X-Virus-Checked: Checked by ClamAV on apache.org +1 Dave On 9 Sep 2010, at 15:47, Klevenz, Stephan wrote: > ok, then I don't see an issue with that. >=20 > +1 >=20 > Stephan >=20 > -----Original Message----- > From: Florent Guillaume [mailto:fg@nuxeo.com]=20 > Sent: Donnerstag, 9. September 2010 16:24 > To: chemistry-dev@incubator.apache.org > Subject: Re: various small cleanups >=20 > On Thu, Sep 9, 2010 at 3:52 PM, Klevenz, Stephan > wrote: >> Florent wrote: >>> 3. >>> ItemIterable.skipTo returns a new iterable. I'm used to skipTo = methods >>> that just modify the iterable in place (for instance the JCR >>> RangeIterator.skip or JCR2 EventJournal.skipTo or Lucene = Spans.skipTo >>> and TermDocs.skipTo), and in the use cases I've seen it's no use >>> creating a new object. Is it ok to change this? >>=20 >> to 3. I'm not sure if I understand correctly. The reason to return an = iterable is to allow dotted expressions to have some "from-to" semantic = of a range: ItemIterable i =3D = folder.getChildren().skipTo(2).getPage(3); >=20 > Returning an object for chained expressions is all right, but what I > want to ensure is that the contract of the method allows it to return > "this" after modifying its internal state, and to change the > implementation to that effect to avoid constructing new objects every > time. >=20 > Florent >=20 > --=20 > Florent Guillaume, Director of R&D, Nuxeo > Open Source, Java EE based, Enterprise Content Management (ECM) > http://www.nuxeo.com http://www.nuxeo.org +33 1 40 33 79 87