You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Thomas Neidhart (JIRA)" <ji...@apache.org> on 2013/03/02 13:59:13 UTC
[jira] [Resolved] (COLLECTIONS-275) IndexedCollection would be a
useful addition to Commons Collections
[ https://issues.apache.org/jira/browse/COLLECTIONS-275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thomas Neidhart resolved COLLECTIONS-275.
-----------------------------------------
Resolution: Fixed
Finished the existing implementation in r1451883:
* support of non-unique keys via a MultiValueMap
* added flag uniqueIndex
* added new static factory method nonUniqueIndexedCollection
* fixes unit tests
* added values(K) method to retrieve all values mapped to a key
* get(Object) will return the first value in case of a non-unique index
To simplify the code, always a MultiMap is used, but it may be more efficient to create a separate UniqueIndexedCollection class which uses a Map internally.
> 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
> Assignee: Stephen Kestle
> Fix For: 4.0
>
>
> 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.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira