commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hollis Waite (JIRA)" <>
Subject [jira] [Commented] (COLLECTIONS-485) Collection copy-constructors should accept wildcarded input
Date Tue, 22 Oct 2013 21:37:46 GMT


Hollis Waite commented on COLLECTIONS-485:

> I do not know exactly why sorted collections have no wildcard type in java.util.Collections

See comments from 10/5. I figured that it's because of the head/tail/sub-methods (which don't
exist for Bag implementations). No big deal either way.

> Collection copy-constructors should accept wildcarded input
> -----------------------------------------------------------
>                 Key: COLLECTIONS-485
>                 URL:
>             Project: Commons Collections
>          Issue Type: Improvement
>          Components: Bag, BidiMap, Collection, List, Map, Set
>    Affects Versions: 4.0-alpha1
>            Reporter: Hollis Waite
>         Attachments: wildcards.patch
> Many Collection constructors copy input in order to self-populate. For convenience (and
consistency with standard Java collections library), wildcarded parameters should be accepted
where possible. Unmodifiable* classes might also benefit from less restrictive generic signatures.

This message was sent by Atlassian JIRA

View raw message