[
https://issues.apache.org/jira/browse/COLLECTIONS-275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12541036
]
Stephen Kestle commented on COLLECTIONS-275:
--------------------------------------------
Good spotting. So the question is whether it's better to implement the
Collection interface or the Map interface.
I'm thinking the Collection, as that's how it will primarily be used. All it
really wants from Map is get() (and perhaps containsKey() and keySet()). If
more than that are needed then a "Map<K,C> mapRepresentation()" method could be
used.
> IndexedCollection would be a useful addition to Commons Collections
> -------------------------------------------------------------------
>
> Key: COLLECTIONS-275
> URL: https://issues.apache.org/jira/browse/COLLECTIONS-275
> Project: Commons Collections
> Issue Type: New Feature
> Components: Collection
> Reporter: Stephen Kestle
> Fix For: Generics
>
>
> I propose that an IndexedCollection is added, which has the following
> properties
> * IndexedCollection<K,C> implements Collection<C>, Map<K,C>
> * Contains a Transformer<C,K> for determining the keys
> * Presents as an unmodifiableMap (all manipulation must be done through the
> collection)
> * It will need constructors for unique indexes (Map) and non-unique
> (Map<K,Collection<V>> / MultiMap).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.