You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "BELUGA BEHR (JIRA)" <ji...@apache.org> on 2018/01/02 14:18:00 UTC

[jira] [Commented] (COLLECTIONS-668) CollectionUtils Contains Any Method for Primitive Array

    [ 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)