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 84395 invoked from network); 11 Sep 2003 16:32:22 -0000 Received: from unknown (HELO l0calh0stu1.localh0st.biz) (67.122.116.206) by daedalus.apache.org with SMTP; 11 Sep 2003 16:32:22 -0000 Received: from mail-1.solidusnetworks.com (xchange-internal [192.168.116.20]) by l0calh0stu1.localh0st.biz (8.12.9/8.12.7) with ESMTP id h8BFWb4o023289 for ; Thu, 11 Sep 2003 08:32:37 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 content-class: urn:content-classes:message Subject: RE: [collections] Potential New Additions? Date: Thu, 11 Sep 2003 09:30:11 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [collections] Potential New Additions? Thread-Index: AcN4ek7a5AiBzbncR2GGVRN1GDRwMAAB3raw From: "Arun Thomas" To: "Jakarta Commons Developers List" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N James,=20 The key is that it's a "Transformer", not that it calls toString(). = It's a utility class so that everyone doesn't have to roll their own = implementation of the Transformer interface which simply calls = String.valueOf() - I'm pretty sure that's what this impl does.... -AMT -----Original Message----- From: james@carmanconsulting.com [mailto:james@carmanconsulting.com]=20 Sent: Thursday, September 11, 2003 8:37 AM To: commons-dev@jakarta.apache.org Subject: Re: [collections] Potential New Additions? There is no reason to have a toString() transformer. String.valueOf() = calls toString(). ----- Original Message -----=20 From: "Stephen Colebourne" To: "Jakarta Commons Developers List" Sent: Thursday, September 11, 2003 11:35 AM Subject: Re: [collections] Potential New Additions? > From: > > I have a few classes that I have found useful on numerous projects=20 > > and > they > > are just general enough that they might be a nice addition to the Commons > > Collections library... > > > > 1. IdentityTransformer - Returns the original object. This is=20 > > useful for > > frameworks which use a Transformer, but do not wish to perform a=20 > > null > check. > TransformerUtils.nopTransformer() > > > 2. PropertyValueTransformer - Returns the value of a property. Currently > > uses BeanUtils, but could be migrated to use BeanMap instead. > See [beanutils] recent addition IIRC. > > > 3. StringValueTransformer - Returns the value of String.valueOf(), > passing > > in the original object. > Could have value. Also ToStringTransformer. > > > 4. PropertyValuePredicate - Returns true if the property has a=20 > > desired target value. > Would go to [beanutils] > > > 5. TransformerChain - Implements the Transformer interface and=20 > > allows you > > to chain together a list of Transformer objects. Transformations=20 > > are applied in the order in which they were added to the chain=20 > > (similar to ComparatorChain). > TransformerUtils.chainedTransformer() > > The TransformerUtils class is in CVS, but not yet released. > > The StringValueOf and ToString transformers would probably be useful=20 > if you > want to submit a tested patch :-) > > Stephen > > > --------------------------------------------------------------------- > 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