[
https://issues.apache.org/jira/browse/COLLECTIONS-430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13604995#comment-13604995
]
Sebb commented on COLLECTIONS-430:
----------------------------------
Also, why is <String, String> treated specially?
It may be a common usage for the map, but surely there are other use cases with
different key/value types.
The factory method name should give a clue as to the key/value types, making it
longer.
A workround is for the application to have its own utility class factory
methods.
These can have as short a name as you like.
> Create static factory methods for concrete data structure impls in the
> corresponding Utils classes
> --------------------------------------------------------------------------------------------------
>
> Key: COLLECTIONS-430
> URL: https://issues.apache.org/jira/browse/COLLECTIONS-430
> Project: Commons Collections
> Issue Type: Improvement
> Affects Versions: 4.0
> Reporter: Thomas Neidhart
> Fix For: 4.0
>
>
> It is quite tedious to write code like this:
> {noformat}
> BidiMap<String, String> map = new DualHashBidiMap<String, String>();
> {noformat}
> a more convenient way would be to take advantage from type inference like
> this:
> {noformat}
> BidiMap<String, String> map = MapUtils.newHashBidiMap();
> {noformat}
> This would apply basically for all data structures that are available in CC
> atm.
--
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