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

[jira] [Commented] (LANG-470) Add containsAll methods to ArrayUtils

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

Matt Benson commented on LANG-470:
----------------------------------

Just for containsAll... this is a Collection method, to be precise, so it is still pretty short, even with the null checks:

{{Arrays.asList(ArrayUtils.nullToEmpty(array1)).containsAll(Arrays.asList(ArrayUtils.nullToEmpty(array2)))}}

--even shorter with static imports.  On the whole the commons team doesn't seem to favor this, myself included.

> Add containsAll methods to ArrayUtils
> -------------------------------------
>
>                 Key: LANG-470
>                 URL: https://issues.apache.org/jira/browse/LANG-470
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.*
>    Affects Versions: 2.4
>            Reporter: Maarten Coene
>             Fix For: 3.x
>
>         Attachments: ArrayUtilsContainsAll.pat
>
>
> The ArrayUtils class contains several "contains" methods.
> It could be usefull to add the corresponding containsAll(Object[] array1, Object[] array2) methods (and corresponding for primitive types).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira