GrailsArrayUtils (Grails 2.4.4)
Date: 2014-10-28

Package: org.codehaus.groovy.grails.commons

## [Groovy] Class GrailsArrayUtils

- org.codehaus.groovy.grails.commons.GrailsArrayUtils

- Utility methods for working with Arrays

  Since:
    2.3.6

- - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `static java.lang.Object` | `add(java.lang.Object array, int pos, java.lang.Object newObject)` Adds the given object to the given array at the given position
    `static java.lang.Object` | `addAll(java.lang.Object array, java.lang.Object otherArray)` Adds the given object to the given array at the given position
    `static java.lang.Object` | `addToEnd(java.lang.Object array, java.lang.Object newObject)` Adds the given object to the end of the array returning a new array
    `static java.lang.Object` | `addToStart(java.lang.Object array, java.lang.Object newObject)` Adds the given object to the start of the array returning a new array
    `static boolean` | `contains(java.lang.Object[] array, java.lang.Object elementToSearchFor)`
    `static java.lang.Object` | `subarray(java.lang.Object args, int start, int end)` Returns the subarray of an existing array
    `static java.lang.String` | `toString(java.lang.Object[] array)`
    `static java.lang.String` | `toString(int[] array)`
    `static java.lang.String` | `toString(boolean[] array)`
    `static java.lang.String` | `toString(float[] array)`
    `static java.lang.String` | `toString(short[] array)`
    `static java.lang.String` | `toString(byte[] array)`
    `static java.lang.String` | `toString(char[] array)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.lang.Object` | `java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Method Detail

    - #### static java.lang.Object add(java.lang.Object array, int pos, java.lang.Object newObject)

      Adds the given object to the given array at the given position

      Parameters:
        `array` - The array
        `pos` - The position
        `newObject` - The object
      Returns:
        A new array, one element bigger, with the object added at the given position

    - #### static java.lang.Object addAll(java.lang.Object array, java.lang.Object otherArray)

      Adds the given object to the given array at the given position

      Parameters:
        `array` - The array
        `pos` - The position
        `newObject` - The object
      Returns:
        A new array, one element bigger, with the object added at the given position

    - #### static java.lang.Object addToEnd(java.lang.Object array, java.lang.Object newObject)

      Adds the given object to the end of the array returning a new array

      Parameters:
        `array` - The array
        `newObject` - The object
      Returns:
        A new array with the given object added to the end

    - #### static java.lang.Object addToStart(java.lang.Object array, java.lang.Object newObject)

      Adds the given object to the start of the array returning a new array

      Parameters:
        `array` - The array
        `newObject` - The object
      Returns:
        A new array with the given object added to the start

    - #### static boolean contains(java.lang.Object[] array, java.lang.Object elementToSearchFor)

    - #### static java.lang.Object subarray(java.lang.Object args, int start, int end)

      Returns the subarray of an existing array

      Parameters:
        `args` - The array object
        `start` - The start index (inclusive)
        `end` - The end index (exclusive)
      Returns:
        The new array

    - #### static java.lang.String toString(java.lang.Object[] array)

    - #### static java.lang.String toString(int[] array)

    - #### static java.lang.String toString(boolean[] array)

    - #### static java.lang.String toString(float[] array)

    - #### static java.lang.String toString(short[] array)

    - #### static java.lang.String toString(byte[] array)

    - #### static java.lang.String toString(char[] array)