commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hollis Waite (JIRA)" <>
Subject [jira] [Commented] (COLLECTIONS-333) Generic versions of Transformed* classes
Date Tue, 10 Sep 2013 20:19:55 GMT


Hollis Waite commented on COLLECTIONS-333:

Perhaps javadoc should be tweaked. Maybe add a sentence explaining counter-intuitive generic
typing. Or removing "For example, if the transformation converts Strings to Integers" verbiage?
To the casual eye, current implementation is confusing. I can create patch if desired.
> Generic versions of Transformed* classes
> ----------------------------------------
>                 Key: COLLECTIONS-333
>                 URL:
>             Project: Commons Collections
>          Issue Type: Improvement
>          Components: Bag, Collection, List, Set
>    Affects Versions: 3.2
>         Environment: OS X
>            Reporter: Edwin Tellman
>            Priority: Minor
> The generic version of Transformer required the input and output types to be identical.
 This seemed to me to reduce the usefulness of transformed collections, as transforming one
type into another seems like it would be a fairly common operation.  I'm not sure how to fix
this, however, as it also doesn't seem feasible to have a generic TransformedCollection with
different input and output types that implements Collection<E>.  Anyway, this patch
de-generifies TransformedCollection, which also fixes some compilation problems.  Please disregard
this change if you disagree and have a better solution.
> Cloned from COLLECTIONS-243, where there is much Transformed* discussion.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message