Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-11213

indexOf extension method for arrays

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 5.0.0-alpha-3
    • groovy-jdk
    • None

    Description

      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:

      Arrays.asList(array).indexOf(object)
      array.findIndexOf(array, object.&equals)
      

      Attachments

        Activity

          People

            emilles Eric Milles
            emilles Eric Milles
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: