commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Benson (JIRA)" <j...@apache.org>
Subject [jira] Updated: (COLLECTIONS-333) Generic versions of Transformed* classes
Date Fri, 11 Sep 2009 17:32:57 GMT

     [ https://issues.apache.org/jira/browse/COLLECTIONS-333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Matt Benson updated COLLECTIONS-333:
------------------------------------

    Description: 
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.


  was:
I added generics to some more classes and fixed some compilation problems.

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.

The modified collection classes are:

Bags: PredicatedSortedBag, AbstractBagDecorator, SynchronizedBag, UnmodifiableSortedBag, SynchronizedSortedBag,
PredicatedBag
Lists: PredicatedList, SynchronizedList
Sets: PredicatedSortedSet, SynchronizedSortedSet, PredicatedSet, UnmodifiableSortedSet, SynchronizedSet
Miscellaneous: PredicatedBuffer



> Generic versions of Transformed* classes
> ----------------------------------------
>
>                 Key: COLLECTIONS-333
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-333
>             Project: Commons Collections
>          Issue Type: Improvement
>          Components: Bag, Collection, List, Set
>    Affects Versions: Generics
>         Environment: OS X
>            Reporter: Edwin Tellman
>            Assignee: Stephen Kestle
>            Priority: Minor
>             Fix For: Generics
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message