commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Neidhart (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (COLLECTIONS-505) Removing duplicates from a collection
Date Wed, 11 Dec 2013 07:41:07 GMT

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

Thomas Neidhart commented on COLLECTIONS-505:
---------------------------------------------

Already possible:

{noformat}
List<Integer> list ....
Collection<Integer> result = CollectionUtils.select(list, new UniquePredicate<Integer>());
{noformat}

> Removing duplicates from a collection
> -------------------------------------
>
>                 Key: COLLECTIONS-505
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-505
>             Project: Commons Collections
>          Issue Type: New Feature
>          Components: Collection, List
>    Affects Versions: 4.0
>            Reporter: Palvali Teja Burugu
>            Priority: Minor
>
> Remove the duplicate elements from the given collection. Generally, to implement this,
the list would be copied to a set and back to list, which removes all the duplicate elements.
A utility method for this would be a good-to-have feature in the CommonsCollection.



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

Mime
View raw message