commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "BELUGA BEHR (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (COLLECTIONS-668) CollectionUtils Contains Any Method for Primitive Array
Date Tue, 02 Jan 2018 14:18:00 GMT

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

BELUGA BEHR commented on COLLECTIONS-668:
-----------------------------------------

[~garydgregory] The scenario I have is something like this:

{code}
private String[] powerUserGroups = config.split{",");

public boolean isAdminUser(Set<Strings> groups) {
   return (Collections.containsAny(groups, powerUserGroups);
}
{code}

Thanks.

> CollectionUtils Contains Any Method for Primitive Array
> -------------------------------------------------------
>
>                 Key: COLLECTIONS-668
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-668
>             Project: Commons Collections
>          Issue Type: New Feature
>          Components: Collection
>    Affects Versions: 4.2
>            Reporter: BELUGA BEHR
>            Priority: Minor
>
> Nice to add a CollectionUtils#containsAny which takes a Collection and a primitive array
as an option.  Loop through every array item and check for existence within the Collection.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message