commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Edwin Tellman (JIRA)" <>
Subject [jira] Commented: (COLLECTIONS-243) Generic versions of Predicated, Syncronized and Unmodifiable classes
Date Sun, 18 Mar 2007 14:06:09 GMT


Edwin Tellman commented on COLLECTIONS-243:

I also like Stephen K's other suggestion to allow for an asymmetric transformer.  

Widening the scope (Transformer<? super E, ? extends E>) is a little less restrictive
than Transformer<E, E> but still doesn't allow quite a few potentially useful transformations.

> Generic versions of Predicated, Syncronized and Unmodifiable classes
> --------------------------------------------------------------------
>                 Key: COLLECTIONS-243
>                 URL:
>             Project: Commons Collections
>          Issue Type: Improvement
>          Components: Bag, Collection, List, Set
>    Affects Versions: Generics
>         Environment: OS X
>            Reporter: Edwin Tellman
>            Priority: Minor
>             Fix For: Generics
>         Attachments: collections_06_03_11.patch
> 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,
> Miscellaneous: PredicatedBuffer

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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message