You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary Gregory (JIRA)" <ji...@apache.org> on 2019/07/05 15:33:00 UTC

[jira] [Commented] (COLLECTIONS-711) Add Utility to Convert Collection to List

    [ https://issues.apache.org/jira/browse/COLLECTIONS-711?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16879373#comment-16879373 ] 

Gary Gregory commented on COLLECTIONS-711:
------------------------------------------

Hi [~belugabehr]

Feel free to provide a PR on GitHub.

Gary

> Add Utility to Convert Collection to List
> -----------------------------------------
>
>                 Key: COLLECTIONS-711
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-711
>             Project: Commons Collections
>          Issue Type: Improvement
>          Components: Collection, List
>            Reporter: David Mollitor
>            Priority: Major
>
> Please take a look at:
>  
> [https://stackoverflow.com/questions/580160/how-to-convert-a-collection-to-list]
>  
> Add a utility method to convert a {{Collection}} to a {{List}}, returning the argument if it is a {{List}} subclass itself.  Make the return type Unmodified for consistency.since if the data comes in as a non-List class, then a copy is made, so modifying the returned collection would not affect the original source, whereas if a {{List}} is passed in, modification to the returned List would impact the original source.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)