I have a few classes that I have found useful on numerous projects 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 useful for
frameworks which use a Transformer, but do not wish to perform a null check.
2.  PropertyValueTransformer - Returns the value of a property.  Currently
uses BeanUtils, but could be migrated to use BeanMap instead.
3.  StringValueTransformer - Returns the value of String.valueOf(), passing
in the original object.
4.  PropertyValuePredicate - Returns true if the property has a desired
target value.
5.  TransformerChain - Implements the Transformer interface and allows you
to chain together a list of Transformer objects.  Transformations are
applied in the order in which they were added to the chain (similar to
ComparatorChain).  Could be used if you wanted the String value of a
property of the bean.  You would add a PropertyValueTransformer and then a
StringValueTransformer.

Please let me know what you think.

James Carman, President
Carman Consulting, Inc.
1218 Bob White Ct.
Edgewood, KY 41018
(513) 325-7977


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to