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-578) CollectionUtils method to accept Comparator as overloaded arguments
Date Wed, 11 Nov 2015 21:05:10 GMT

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

Thomas Neidhart commented on COLLECTIONS-578:
---------------------------------------------

Collections 4 introduced an Equator interface for this purpose, which is already used in some
places.

> CollectionUtils method to accept Comparator as overloaded arguments
> -------------------------------------------------------------------
>
>                 Key: COLLECTIONS-578
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-578
>             Project: Commons Collections
>          Issue Type: Improvement
>    Affects Versions: 4.0
>            Reporter: Abraham Tehrani
>            Priority: Minor
>
> CollectionUtils has numerous methods that would benefit from having an overloaded argument
that accepts Comparators. This is helpful when Objects in the Lists do not implement equals
the way that is wanted.
> Example if CollectionUtils.containsAny(...) accepted a Comparator interface, we could
then define a custom implementation of comparison.
> This would make it far more flexible



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message