You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (Jira)" <ji...@apache.org> on 2023/12/22 11:39:01 UTC
[jira] [Closed] (GROOVY-11213) indexOf extension method for arrays
[ https://issues.apache.org/jira/browse/GROOVY-11213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul King closed GROOVY-11213.
------------------------------
> indexOf extension method for arrays
> -----------------------------------
>
> Key: GROOVY-11213
> URL: https://issues.apache.org/jira/browse/GROOVY-11213
> Project: Groovy
> Issue Type: Improvement
> Components: groovy-jdk
> Reporter: Eric Milles
> Assignee: Eric Milles
> Priority: Minor
> Fix For: 5.0.0-alpha-3
>
>
> For cases where {{Arrays#binarySearch}} cannot be used and for consistency with lists, consider adding {{indexOf(element)}} extension methods for array types.
> Alternatives currently available:
> {code:groovy}
> Arrays.asList(array).indexOf(object)
> array.findIndexOf(array, object.&equals)
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)