Return-Path: Delivered-To: apmail-commons-dev-archive@www.apache.org Received: (qmail 9265 invoked from network); 19 Oct 2010 12:01:33 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 19 Oct 2010 12:01:33 -0000 Received: (qmail 34113 invoked by uid 500); 19 Oct 2010 12:01:33 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 33627 invoked by uid 500); 19 Oct 2010 12:01:31 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 33617 invoked by uid 99); 19 Oct 2010 12:01:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Oct 2010 12:01:30 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of sebbaz@gmail.com designates 209.85.160.171 as permitted sender) Received: from [209.85.160.171] (HELO mail-gy0-f171.google.com) (209.85.160.171) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Oct 2010 12:01:24 +0000 Received: by gyh20 with SMTP id 20so1102013gyh.30 for ; Tue, 19 Oct 2010 05:00:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=K/kr6J2fVjYpRKG+tsLzh3iu3dMQ1LD4THx2n099YyU=; b=vvsigu2PgJKRdDp4UI9y1giOlM3yMm1nxRqLE9khgjwCE39eKegX7yIc+KnXFIotTY z6pf7etAlQq3wgYEVrPvSvnYMF/Roke8kZQq5bDi8l//YRRt0xkJgSRfrqZaID7u/4yZ AJ70uFWqlyxtAvrYD3Gb0YyBeB5tSZeKVHWZU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=DAUOeOHSjqNBR0Lo9q89KCbDRiFeDJZNVM+zYKyGcL3Xk9HnX7+IVg0NobmyJflabT sLjG10yQNcp/pbeA9ndlUFOd+ZDMIfZ5Ac4Y/ETNM9ygQmJOhLoC6jgChThPS7Sa+AQn FivipkJcWcN5voANnHdZt60iKIIPBOSepGa1U= MIME-Version: 1.0 Received: by 10.42.226.135 with SMTP id iw7mr294532icb.182.1287489658772; Tue, 19 Oct 2010 05:00:58 -0700 (PDT) Received: by 10.220.108.222 with HTTP; Tue, 19 Oct 2010 05:00:58 -0700 (PDT) Date: Tue, 19 Oct 2010 13:00:58 +0100 Message-ID: Subject: [COLLECTIONS] TransformedCollection generic signature seems wrong From: sebb To: Commons Developers List Content-Type: text/plain; charset=ISO-8859-1 I'm trying to get my head round the generic signature of the decorate() method, for example in TransformedCollection: public static Collection decorate(Collection coll, Transformer transformer) This does not seem to allow one to transform String into Integer (or vice-versa) without ignoring type-safety warnings. I would expect to be able to do something like: Collection cs = ... Transformer s2i = ... Collection ci = TransformedCollection(cs, s2i); But the signature does not allow this. I think the signature should probably look like: public static Collection decorate(Collection coll, Transformer transformer) where I and O stand for Input and Output, as in the Transformer API. Or have I misunderstood the purpose of the method? --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org