ArrayGroovyMethods (Groovy 5.0.6)

Package: org.codehaus.groovy.runtime

## [Java] Class ArrayGroovyMethods

- org.codehaus.groovy.runtime.ArrayGroovyMethods

-     public class ArrayGroovyMethods
      extends DefaultGroovyMethodsSupport

  Defines new groovy methods which appear on arrays inside the Groovy environment. Static methods are used with the first parameter being the destination class, i.e. `public static int[] each(int[] self, Closure closure)` provides an `each({i -> })` method for `int[]`.

  NOTE: While this class contains many 'public' static methods, it is primarily regarded as an internal class (its internal package name suggests this also). We value backwards compatibility of these methods when used within Groovy but value less backwards compatibility at the Java method call level. I.e. future versions of Groovy may remove or move a method call in this file but would normally aim to keep the method available from within Groovy.

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public static boolean` | `any(boolean[] self)` Iterates over the contents of a boolean Array, and checks whether any element is true.
    `` | `public static boolean` | `any(boolean[] self, Closure<?> predicate)` Iterates over the contents of a boolean Array, and checks whether a predicate is valid for at least one element.
    `` | `public static boolean` | `any(byte[] self, Closure<?> predicate)` Iterates over the contents of a byte Array, and checks whether a predicate is valid for at least one element.
    `` | `public static boolean` | `any(char[] self, Closure<?> predicate)` Iterates over the contents of a char Array, and checks whether a predicate is valid for at least one element.
    `` | `public static boolean` | `any(short[] self, Closure<?> predicate)` Iterates over the contents of a short Array, and checks whether a predicate is valid for at least one element.
    `` | `public static boolean` | `any(int[] self, Closure<?> predicate)` Iterates over the contents of an int Array, and checks whether a predicate is valid for at least one element.
    `` | `public static boolean` | `any(long[] self, Closure<?> predicate)` Iterates over the contents of a long Array, and checks whether a predicate is valid for at least one element.
    `` | `public static boolean` | `any(float[] self, Closure<?> predicate)` Iterates over the contents of a float Array, and checks whether a predicate is valid for at least one element.
    `` | `public static boolean` | `any(double[] self, Closure<?> predicate)` Iterates over the contents of a double Array, and checks whether a predicate is valid for at least one element.
    `<T>` | `public static boolean` | `any(T[] self, Closure<?> predicate)` Iterates over the contents of an Array, and checks whether a predicate is valid for at least one element.
    `` | `public static boolean` | `asBoolean(boolean[] self)` Coerces a boolean array to a boolean value.
    `` | `public static boolean` | `asBoolean(byte[] self)` Coerces a byte array to a boolean value.
    `` | `public static boolean` | `asBoolean(char[] self)` Coerces a char array to a boolean value.
    `` | `public static boolean` | `asBoolean(short[] self)` Coerces a short array to a boolean value.
    `` | `public static boolean` | `asBoolean(int[] self)` Coerces an int array to a boolean value.
    `` | `public static boolean` | `asBoolean(long[] self)` Coerces a long array to a boolean value.
    `` | `public static boolean` | `asBoolean(float[] self)` Coerces a float array to a boolean value.
    `` | `public static boolean` | `asBoolean(double[] self)` Coerces a double array to a boolean value.
    `` | `public static boolean` | `asBoolean(Object[] self)` Coerces an object array to a boolean value.
    `<T>` | `public static T` | `asType(Object[] self, Class<T> type)` Converts the given array to either a List, Set, or SortedSet.
    `` | `public static BigDecimal` | `average(byte[] self)` Calculates the average of the bytes in the array.
    `` | `public static BigDecimal` | `average(short[] self)` Calculates the average of the shorts in the array.
    `` | `public static BigDecimal` | `average(int[] self)` Calculates the average of the ints in the array.
    `` | `public static BigDecimal` | `average(long[] self)` Calculates the average of the longs in the array.
    `` | `public static double` | `average(float[] self)` Calculates the average of the floats in the array.
    `` | `public static double` | `average(double[] self)` Calculates the average of the doubles in the array.
    `` | `public static Object` | `average(Object[] self)` Averages the items in an array.
    `<T>` | `public static Object` | `average(T[] self, Closure<?> closure)` Averages the result of applying a closure to each item of an array.
    `` | `public static List<List<Boolean>>` | `chop(boolean[] self, int chopSizes)` Chops the boolean array into pieces, returning lists with sizes corresponding to the supplied chop sizes.
    `` | `public static List<List<Byte>>` | `chop(byte[] self, int chopSizes)` Chops the byte array into pieces, returning lists with sizes corresponding to the supplied chop sizes.
    `` | `public static List<List<Character>>` | `chop(char[] self, int chopSizes)` Chops the char array into pieces, returning lists with sizes corresponding to the supplied chop sizes.
    `` | `public static List<List<Short>>` | `chop(short[] self, int chopSizes)` Chops the short array into pieces, returning lists with sizes corresponding to the supplied chop sizes.
    `` | `public static List<List<Integer>>` | `chop(int[] self, int chopSizes)` Chops the int array into pieces, returning lists with sizes corresponding to the supplied chop sizes.
    `` | `public static List<List<Long>>` | `chop(long[] self, int chopSizes)` Chops the long array into pieces, returning lists with sizes corresponding to the supplied chop sizes.
    `` | `public static List<List<Float>>` | `chop(float[] self, int chopSizes)` Chops the float array into pieces, returning lists with sizes corresponding to the supplied chop sizes.
    `` | `public static List<List<Double>>` | `chop(double[] self, int chopSizes)` Chops the double array into pieces, returning lists with sizes corresponding to the supplied chop sizes.
    `<T>` | `public static List<List<T>>` | `chop(T[] self, int chopSizes)` Chops the array into pieces, returning lists with sizes corresponding to the supplied chop sizes.
    `<T>` | `public static List<List<T>>` | `collate(T[] self, int size)` Collates an array.
    `<T>` | `public static List<List<T>>` | `collate(T[] self, int size, int step)` Collates an array into sub-lists.
    `<T>` | `public static List<List<T>>` | `collate(T[] self, int size, boolean keepRemainder)` Collates this array into sub-lists.
    `<T>` | `public static List<List<T>>` | `collate(T[] self, int size, int step, boolean keepRemainder)` Collates this array into sub-lists.
    `<E, T>` | `public static List<T>` | `collect(E[] self, Closure<T> transform)` Iterates through this Array transforming each item into a new value using the `transform` closure, returning a list of transformed values.
    `<E, T, C extends Collection<T>>` | `public static C` | `collect(E[] self, C collector, Closure<? extends T> transform)` Iterates through this Array transforming each item into a new value using the `transform` closure and adding it to the supplied `collector`.
    `<K, V, E>` | `public static Map<K, V>` | `collectEntries(E[] self)` A variant of collectEntries using the identity closure as the transform.
    `<K, V, E>` | `public static Map<K, V>` | `collectEntries(E[] self, Map<K, V> collector)` A variant of collectEntries using the identity closure as the transform.
    `<K, V, E>` | `public static Map<K, V>` | `collectEntries(E[] self, Closure<?> transform)` Iterates through this array transforming each item using the `transform` closure and returning a map of the resulting transformed entries.
    `<K, V, E>` | `public static Map<K, V>` | `collectEntries(E[] self, Map<K, V> collector, Closure<?> transform)` Iterates through this array transforming each item using the `transform` closure and returning a map of the resulting transformed entries.
    `<K, V, E>` | `public static Map<K, V>` | `collectEntries(E[] self, Function<? super E, K> keyTransform, Function<? super E, V> valueTransform)` A variant of collectEntries for arrays with separate functions for transforming the keys and values.
    `<K, V, E>` | `public static Map<K, V>` | `collectEntries(E[] self, Map<K, V> collector, Function<? super E, K> keyTransform, Function<? super E, V> valueTransform)` A variant of collectEntries for arrays with separate functions for transforming the keys and values.
    `<T, E>` | `public static List<T>` | `collectMany(E[] self, Closure<? extends Collection<? extends T>> projection)` Projects each item from a source array to a collection and concatenates (flattens) the resulting collections into a single list.
    `<T, E, C extends Collection<T>>` | `public static C` | `collectMany(E[] self, C collector, Closure<? extends Collection<? extends T>> projection)` Projects each item from a source array to a collection and concatenates (flattens) the resulting collections into a single list.
    `` | `public static double[]` | `column(double self, int col)` Select a column from a 2D array.
    `` | `public static float[]` | `column(float self, int col)` Select a column from a 2D array.
    `` | `public static int[]` | `column(int self, int col)` Select a column from a 2D array.
    `` | `public static long[]` | `column(long self, int col)` Select a column from a 2D array.
    `` | `public static Iterator<double[]>` | `columns(double self)`
    `` | `public static Iterator<float[]>` | `columns(float self)`
    `` | `public static Iterator<int[]>` | `columns(int self)`
    `` | `public static Iterator<long[]>` | `columns(long self)`
    `` | `public static boolean` | `contains(boolean[] self, Object value)` Checks whether the array contains the given value.
    `` | `public static boolean` | `contains(byte[] self, Object value)` Checks whether the array contains the given value.
    `` | `public static boolean` | `contains(char[] self, Object value)` Checks whether the array contains the given value.
    `` | `public static boolean` | `contains(short[] self, Object value)` Checks whether the array contains the given value.
    `` | `public static boolean` | `contains(int[] self, Object value)` Checks whether the array contains the given value.
    `` | `public static boolean` | `contains(long[] self, Object value)` Checks whether the array contains the given value.
    `` | `public static boolean` | `contains(float[] self, Object value)` Checks whether the array contains the given value.
    `` | `public static boolean` | `contains(double[] self, Object value)` Checks whether the array contains the given value.
    `` | `public static boolean` | `contains(Object[] self, Object value)` Checks whether the array contains the given value.
    `` | `public static Number` | `count(boolean[] self, Object value)` Counts the number of occurrences of the given value inside this array.
    `` | `public static Number` | `count(byte[] self, Object value)` Counts the number of occurrences of the given value inside this array.
    `` | `public static Number` | `count(char[] self, Object value)` Counts the number of occurrences of the given value inside this array.
    `` | `public static Number` | `count(short[] self, Object value)` Counts the number of occurrences of the given value inside this array.
    `` | `public static Number` | `count(int[] self, Object value)` Counts the number of occurrences of the given value inside this array.
    `` | `public static Number` | `count(long[] self, Object value)` Counts the number of occurrences of the given value inside this array.
    `` | `public static Number` | `count(float[] self, Object value)` Counts the number of occurrences of the given value inside this array.
    `` | `public static Number` | `count(double[] self, Object value)` Counts the number of occurrences of the given value inside this array.
    `` | `public static Number` | `count(Object[] self, Object value)` Counts the number of occurrences of the given value inside this array.
    `<T>` | `public static Number` | `count(T[] self, Closure<?> predicate)` Counts the number of occurrences which satisfy the given closure from inside this array.
    `<K, E>` | `public static Map<K, Integer>` | `countBy(E[] self, Closure<K> closure)` Sorts all array members into groups determined by the supplied mapping closure and counts the group size.
    `<E>` | `public static Map<E, Integer>` | `countBy(E[] self)` Creates a multiset-like map of the array members.
    `<T>` | `public static T[]` | `drop(T[] self, int num)` Drops the given number of elements from the head of this array if they are available.
    `<T>` | `public static T[]` | `dropRight(T[] self, int num)` Drops the given number of elements from the tail of this array if they are available.
    `<T>` | `public static T[]` | `dropWhile(T[] self, Closure<?> condition)` Create a suffix of the given array by dropping as many elements as possible from the front of the original array such that calling the given closure condition evaluates to true when passed each of the dropped elements.
    `` | `public static boolean[]` | `each(boolean[] self, Consumer<Boolean> consumer)` Iterates through a boolean[] passing each boolean to the given consumer.
    `` | `public static byte[]` | `each(byte[] self, Consumer<Byte> consumer)` Iterates through a byte[] passing each byte to the given consumer.
    `` | `public static char[]` | `each(char[] self, Consumer<Character> consumer)` Iterates through a char[] passing each char to the given consumer.
    `` | `public static short[]` | `each(short[] self, Consumer<Short> consumer)` Iterates through a short[] passing each short to the given consumer.
    `` | `public static int[]` | `each(int[] self, IntConsumer consumer)` Iterates through an int[] passing each int to the given consumer.
    `` | `public static long[]` | `each(long[] self, LongConsumer consumer)` Iterates through a long[] passing each long to the given consumer.
    `` | `public static float[]` | `each(float[] self, Consumer<Float> consumer)` Iterates through a float[] passing each float to the given consumer.
    `` | `public static double[]` | `each(double[] self, DoubleConsumer consumer)` Iterates through a double[] passing each double to the given consumer.
    `<T>` | `public static T[]` | `each(T[] self, Closure<?> closure)` Iterates through an array passing each array entry to the given closure.
    `` | `public static void` | `eachByte(byte[] self, Closure<?> closure)` Traverses through each byte of this byte array.
    `` | `public static void` | `eachByte(Byte[] self, Closure<?> closure)` Traverses through each byte of this Byte array.
    `` | `public static double` | `eachColumn(double self, Closure<?> closure)` Process the columns of the array.
    `` | `public static float` | `eachColumn(float self, Closure<?> closure)` Process the columns of the array.
    `` | `public static int` | `eachColumn(int self, Closure<?> closure)` Process the columns of the array.
    `` | `public static long` | `eachColumn(long self, Closure<?> closure)` Process the columns of the array.
    `` | `public static boolean[]` | `eachWithIndex(boolean[] self, Closure<?> closure)` Iterates through a boolean[], passing each boolean and the element's index (a counter starting at zero) to the given closure.
    `` | `public static byte[]` | `eachWithIndex(byte[] self, Closure<?> closure)` Iterates through a byte[], passing each byte and the element's index (a counter starting at zero) to the given closure.
    `` | `public static char[]` | `eachWithIndex(char[] self, Closure<?> closure)` Iterates through a char[], passing each char and the element's index (a counter starting at zero) to the given closure.
    `` | `public static short[]` | `eachWithIndex(short[] self, Closure<?> closure)` Iterates through a short[], passing each short and the element's index (a counter starting at zero) to the given closure.
    `` | `public static int[]` | `eachWithIndex(int[] self, Closure<?> closure)` Iterates through an int[], passing each int and the element's index (a counter starting at zero) to the given closure.
    `` | `public static long[]` | `eachWithIndex(long[] self, Closure<?> closure)` Iterates through a long[], passing each long and the element's index (a counter starting at zero) to the given closure.
    `` | `public static float[]` | `eachWithIndex(float[] self, Closure<?> closure)` Iterates through a float[], passing each float and the element's index (a counter starting at zero) to the given closure.
    `` | `public static double[]` | `eachWithIndex(double[] self, Closure<?> closure)` Iterates through a double[], passing each double and the element's index (a counter starting at zero) to the given closure.
    `<T>` | `public static T[]` | `eachWithIndex(T[] self, Closure<?> closure)` Iterates through an array, passing each array element and the element's index (a counter starting at zero) to the given closure.
    `` | `public static boolean` | `equals(boolean[] self, boolean[] right)` Compares the contents of this array to the contents of the given array.
    `` | `public static boolean` | `equals(byte[] self, byte[] right)` Compares the contents of this array to the contents of the given array.
    `` | `public static boolean` | `equals(char[] self, char[] right)` Compares the contents of this array to the contents of the given array.
    `` | `public static boolean` | `equals(short[] self, short[] right)` Compares the contents of this array to the contents of the given array.
    `` | `public static boolean` | `equals(int[] self, int[] right)` Compares the contents of this array to the contents of the given array.
    `` | `public static boolean` | `equals(long[] self, long[] right)` Compares the contents of this array to the contents of the given array.
    `` | `public static boolean` | `equals(float[] self, float[] right)` Compares the contents of this array to the contents of the given array.
    `` | `public static boolean` | `equals(double[] self, double[] right)` Compares the contents of this array to the contents of the given array.
    `` | `public static boolean` | `equals(Object[] left, List<?> right)` Determines if the contents of this array are equal to the contents of the given list, in the same order.
    `` | `public static boolean` | `every(boolean[] self)` Iterates over the contents of a boolean Array, and checks whether every element is true.
    `` | `public static boolean` | `every(boolean[] self, Closure<?> predicate)` Iterates over the contents of a boolean Array, and checks whether a predicate is valid for every element.
    `` | `public static boolean` | `every(byte[] self, Closure<?> predicate)` Iterates over the contents of a byte Array, and checks whether a predicate is valid for all elements.
    `` | `public static boolean` | `every(char[] self, Closure<?> predicate)` Iterates over the contents of a char Array, and checks whether a predicate is valid for all elements.
    `` | `public static boolean` | `every(short[] self, Closure<?> predicate)` Iterates over the contents of a short Array, and checks whether a predicate is valid for all elements.
    `` | `public static boolean` | `every(int[] self, Closure<?> predicate)` Iterates over the contents of an int Array, and checks whether a predicate is valid for all elements.
    `` | `public static boolean` | `every(long[] self, Closure<?> predicate)` Iterates over the contents of a long Array, and checks whether a predicate is valid for all elements.
    `` | `public static boolean` | `every(float[] self, Closure<?> predicate)` Iterates over the contents of a float Array, and checks whether a predicate is valid for all elements.
    `` | `public static boolean` | `every(double[] self, Closure<?> predicate)` Iterates over the contents of a double Array, and checks whether a predicate is valid for all elements.
    `<T>` | `public static boolean` | `every(T[] self, Closure<?> predicate)` Used to determine if the given predicate closure is valid (i.e. returns `true` for all items in this Array).
    `<T>` | `public static T` | `find(T[] self, Closure<?> condition)` Finds the first element in the array that matches the given closure condition.
    `<T>` | `public static List<T>` | `findAll(T[] self)` Finds the elements of the array matching the IDENTITY Closure (i.e. matching Groovy truth).
    `<T>` | `public static List<T>` | `findAll(T[] self, Closure<?> condition)` Finds all elements of the array matching the given Closure condition.
    `<T>` | `public static int` | `findIndexOf(T[] self, Closure<?> condition)` Iterates over the elements of an array and returns the index of the first item that satisfies the condition specified by the closure.
    `<T>` | `public static int` | `findIndexOf(T[] self, int startIndex, Closure<?> condition)` Iterates over the elements of an array, starting from a specified index, and returns the index of the first item that satisfies the condition specified by the closure.
    `<T>` | `public static List<Number>` | `findIndexValues(T[] self, Closure<?> condition)` Iterates over the elements of an array and returns the index values of the items that match the condition specified in the closure.
    `<T>` | `public static List<Number>` | `findIndexValues(T[] self, Number startIndex, Closure<?> condition)` Iterates over the elements of an array, starting from a specified index, and returns the index values of the items that match the condition specified in the closure.
    `<T>` | `public static int` | `findLastIndexOf(T[] self, Closure<?> condition)` Returns the index of the last item that matches the specified condition.
    `<T>` | `public static int` | `findLastIndexOf(T[] self, int lowerBound, Closure<?> condition)` Returns the index of the last item that matches the specified condition that is at or beyond the given index.
    `<T>` | `public static T` | `findResult(T[] self)` Iterates through the Array stopping once the first non-null result is found and returning that result.
    `<T, U extends T, V extends T>` | `public static T` | `findResult(U[] self, V defaultResult)` Iterates through the Array stopping once the first non-null result is found and returning that result.
    `<S, T>` | `public static T` | `findResult(S[] self, Closure<T> condition)` Iterates through the Array calling the given closure condition for each item but stopping once the first non-null result is found and returning that result.
    `<S, T, U extends T, V extends T>` | `public static T` | `findResult(S[] self, U defaultResult, Closure<V> condition)` Iterates through the Array calling the given closure condition for each item but stopping once the first non-null result is found and returning that result.
    `<T>` | `public static Collection<T>` | `findResults(T[] self)` Iterates through the Array collecting any non-null results.
    `<T, U>` | `public static Collection<T>` | `findResults(U[] self, Closure<T> filteringTransform)` Iterates through the Array transforming items using the supplied closure and collecting any non-null results.
    `` | `public static boolean` | `first(boolean[] self)` Returns the first item from the boolean array.
    `` | `public static byte` | `first(byte[] self)` Returns the first item from the byte array.
    `` | `public static char` | `first(char[] self)` Returns the first item from the char array.
    `` | `public static short` | `first(short[] self)` Returns the first item from the short array.
    `` | `public static int` | `first(int[] self)` Returns the first item from the int array.
    `` | `public static long` | `first(long[] self)` Returns the first item from the long array.
    `` | `public static float` | `first(float[] self)` Returns the first item from the float array.
    `` | `public static double` | `first(double[] self)` Returns the first item from the double array.
    `<T>` | `public static T` | `first(T[] self)` Returns the first item from the array.
    `` | `public static List<Boolean>` | `flatten(boolean[] self)` Flattens an array.
    `` | `public static List<Byte>` | `flatten(byte[] self)` Flattens an array.
    `` | `public static List<Character>` | `flatten(char[] self)` Flattens an array.
    `` | `public static List<Short>` | `flatten(short[] self)` Flattens an array.
    `` | `public static List<Integer>` | `flatten(int[] self)` Flattens an array.
    `` | `public static List<Long>` | `flatten(long[] self)` Flattens an array.
    `` | `public static List<Float>` | `flatten(float[] self)` Flattens an array.
    `` | `public static List<Double>` | `flatten(double[] self)` Flattens an array.
    `` | `public static List<Object>` | `flatten(Object[] self)` Flattens an array.
    `` | `public static List<Boolean>` | `flatten(boolean self)` Flattens a 2D array into a new collection.
    `` | `public static List<Byte>` | `flatten(byte self)` Flattens a 2D array into a new collection.
    `` | `public static List<Character>` | `flatten(char self)` Flattens a 2D array into a new collection.
    `` | `public static List<Short>` | `flatten(short self)` Flattens a 2D array into a new collection.
    `` | `public static List<Integer>` | `flatten(int self)` Flattens a 2D array into a new collection.
    `` | `public static List<Long>` | `flatten(long self)` Flattens a 2D array into a new collection.
    `` | `public static List<Float>` | `flatten(float self)` Flattens a 2D array into a new collection.
    `` | `public static List<Double>` | `flatten(double self)` Flattens a 2D array into a new collection.
    `` | `public static Collection` | `flattenMany(Object[] self, Closure<?> transform)` Flatten an array.
    `` | `public static List<Boolean>` | `getAt(boolean[] array, Range<?> range)` Supports the subscript operator for a boolean array with a range giving the desired indices.
    `` | `public static List<Byte>` | `getAt(byte[] array, Range<?> range)` Supports the subscript operator for a byte array with a range giving the desired indices.
    `` | `public static List<Character>` | `getAt(char[] array, Range<?> range)` Supports the subscript operator for a char array with a range giving the desired indices.
    `` | `public static List<Short>` | `getAt(short[] array, Range<?> range)` Supports the subscript operator for a short array with a range giving the desired indices.
    `` | `public static List<Integer>` | `getAt(int[] array, Range<?> range)` Supports the subscript operator for an int array with a range giving the desired indices.
    `` | `public static List<Long>` | `getAt(long[] array, Range<?> range)` Supports the subscript operator for a long array with a range giving the desired indices.
    `` | `public static List<Float>` | `getAt(float[] array, Range<?> range)` Supports the subscript operator for a float array with a range giving the desired indices.
    `` | `public static List<Double>` | `getAt(double[] array, Range<?> range)` Supports the subscript operator for a double array with a range giving the desired indices.
    `<T>` | `public static List<T>` | `getAt(T[] array, Range<?> range)` Supports the subscript operator for an object array with a range giving the desired indices.
    `` | `public static List<Boolean>` | `getAt(boolean[] array, IntRange range)` Supports the subscript operator for a boolean array with an IntRange giving the desired indices.
    `` | `public static List<Byte>` | `getAt(byte[] array, IntRange range)` Supports the subscript operator for a byte array with an IntRange giving the desired indices.
    `` | `public static List<Character>` | `getAt(char[] array, IntRange range)` Supports the subscript operator for a char array with an IntRange giving the desired indices.
    `` | `public static List<Short>` | `getAt(short[] array, IntRange range)` Supports the subscript operator for a short array with an IntRange giving the desired indices.
    `` | `public static List<Integer>` | `getAt(int[] array, IntRange range)` Supports the subscript operator for an int array with an IntRange giving the desired indices.
    `` | `public static List<Long>` | `getAt(long[] array, IntRange range)` Supports the subscript operator for a long array with an IntRange giving the desired indices.
    `` | `public static List<Float>` | `getAt(float[] array, IntRange range)` Supports the subscript operator for a float array with an IntRange giving the desired indices.
    `` | `public static List<Double>` | `getAt(double[] array, IntRange range)` Supports the subscript operator for a double array with an IntRange giving the desired indices.
    `<T>` | `public static List<T>` | `getAt(T[] array, IntRange range)` Supports the subscript operator for an object array with an IntRange giving the desired indices.
    `` | `public static List<Boolean>` | `getAt(boolean[] array, ObjectRange range)` Supports the subscript operator for a boolean array with an ObjectRange giving the desired indices.
    `` | `public static List<Byte>` | `getAt(byte[] array, ObjectRange range)` Supports the subscript operator for a byte array with an ObjectRange giving the desired indices.
    `` | `public static List<Character>` | `getAt(char[] array, ObjectRange range)` Supports the subscript operator for a boolean array with an ObjectRange giving the desired indices.
    `` | `public static List<Short>` | `getAt(short[] array, ObjectRange range)` Supports the subscript operator for a short array with an ObjectRange giving the desired indices.
    `` | `public static List<Integer>` | `getAt(int[] array, ObjectRange range)` Supports the subscript operator for an int array with an ObjectRange giving the desired indices.
    `` | `public static List<Long>` | `getAt(long[] array, ObjectRange range)` Supports the subscript operator for a long array with an ObjectRange giving the desired indices.
    `` | `public static List<Float>` | `getAt(float[] array, ObjectRange range)` Supports the subscript operator for a float array with an ObjectRange giving the desired indices.
    `` | `public static List<Double>` | `getAt(double[] array, ObjectRange range)` Supports the subscript operator for a double array with an ObjectRange giving the desired indices.
    `<T>` | `public static List<T>` | `getAt(T[] array, ObjectRange range)` Supports the subscript operator for an object array with an ObjectRange giving the desired indices.
    `<T>` | `public static List<T>` | `getAt(T[] array, EmptyRange<?> range)` Supports the subscript operator for an object array with an EmptyRange.
    `` | `public static List<Boolean>` | `getAt(boolean[] array, Collection<?> indices)` Supports the subscript operator for a boolean array with a (potentially nested) collection giving the desired indices.
    `` | `public static List<Byte>` | `getAt(byte[] array, Collection<?> indices)` Supports the subscript operator for a byte array with a (potentially nested) collection giving the desired indices.
    `` | `public static List<Character>` | `getAt(char[] array, Collection<?> indices)` Supports the subscript operator for a char array with a (potentially nested) collection giving the desired indices.
    `` | `public static List<Short>` | `getAt(short[] array, Collection<?> indices)` Supports the subscript operator for a short array with a (potentially nested) collection giving the desired indices.
    `` | `public static List<Integer>` | `getAt(int[] array, Collection<?> indices)` Supports the subscript operator for an int array with a (potentially nested) collection giving the desired indices.
    `` | `public static List<Long>` | `getAt(long[] array, Collection<?> indices)` Supports the subscript operator for a long array with a (potentially nested) collection giving the desired indices.
    `` | `public static List<Float>` | `getAt(float[] array, Collection<?> indices)` Supports the subscript operator for a float array with a (potentially nested) collection giving the desired indices.
    `` | `public static List<Double>` | `getAt(double[] array, Collection<?> indices)` Supports the subscript operator for a double array with a (potentially nested) collection giving the desired indices.
    `<T>` | `public static List<T>` | `getAt(T[] array, Collection<?> indices)` Selects a List of items from an array using a Collection to identify the indices to be selected.
    `` | `public static IntRange` | `getIndices(boolean[] self)` Returns indices of the boolean array.
    `` | `public static IntRange` | `getIndices(byte[] self)` Returns indices of the byte array.
    `` | `public static IntRange` | `getIndices(char[] self)` Returns indices of the char array.
    `` | `public static IntRange` | `getIndices(short[] self)` Returns indices of the short array.
    `` | `public static IntRange` | `getIndices(int[] self)` Returns indices of the int array.
    `` | `public static IntRange` | `getIndices(long[] self)` Returns indices of the long array.
    `` | `public static IntRange` | `getIndices(float[] self)` Returns indices of the float array.
    `` | `public static IntRange` | `getIndices(double[] self)` Returns indices of the double array.
    `<T>` | `public static IntRange` | `getIndices(T[] self)` Returns indices of the array.
    `<T>` | `public static List<T>` | `grep(T[] self)` Iterates over the array returning each element that matches using the IDENTITY Closure as a filter - effectively returning all elements which satisfy Groovy truth.
    `<T>` | `public static List<T>` | `grep(T[] self, Object filter)` Iterates over the array of items and returns a collection of items that match the given filter - calling the DefaultGroovyMethods.isCase method used by switch statements.
    `<K, T>` | `public static Map<K, List<T>>` | `groupBy(T[] self, Closure<K> closure)` Sorts all array members into groups determined by the supplied mapping closure.
    `` | `public static Map` | `groupBy(Object[] self, Object closures)` Sorts all array members into (sub)groups determined by the supplied mapping closures as per the Iterable variant of this method.
    `` | `public static Map` | `groupBy(Object[] self, List<Closure<?>> closures)` Sorts all array members into (sub)groups determined by the supplied mapping closures as per the list variant of this method.
    `` | `public static boolean` | `head(boolean[] self)` Returns the first item from the boolean array.
    `` | `public static byte` | `head(byte[] self)` Returns the first item from the byte array.
    `` | `public static char` | `head(char[] self)` Returns the first item from the char array.
    `` | `public static short` | `head(short[] self)` Returns the first item from the short array.
    `` | `public static int` | `head(int[] self)` Returns the first item from the int array.
    `` | `public static long` | `head(long[] self)` Returns the first item from the long array.
    `` | `public static float` | `head(float[] self)` Returns the first item from the float array.
    `` | `public static double` | `head(double[] self)` Returns the first item from the double array.
    `<T>` | `public static T` | `head(T[] self)` Returns the first item from the Object array.
    `` | `public static int` | `indexOf(Object[] self, Object object)` Returns the index of the first occurrence of the specified element in the array.
    `` | `public static Map<Integer, Integer>` | `indexed(int[] self)` Zips an int[] with indices in (index, value) order starting from index 0.
    `` | `public static Map<Integer, Long>` | `indexed(long[] self)` Zips a long[] with indices in (index, value) order starting from index 0.
    `` | `public static Map<Integer, Float>` | `indexed(float[] self)` Zips a float[] with indices in (index, value) order starting from index 0.
    `` | `public static Map<Integer, Double>` | `indexed(double[] self)` Zips a double[] with indices in (index, value) order starting from index 0.
    `` | `public static Map<Integer, Integer>` | `indexed(int[] self, int offset)` Zips an int[] with indices in (index, value) order starting from a given index.
    `` | `public static Map<Integer, Long>` | `indexed(long[] self, int offset)` Zips a long[] with indices in (index, value) order starting from a given index.
    `` | `public static Map<Integer, Float>` | `indexed(float[] self, int offset)` Zips a float[] with indices in (index, value) order starting from a given index.
    `` | `public static Map<Integer, Double>` | `indexed(double[] self, int offset)` Zips a double[] with indices in (index, value) order starting from a given index.
    `<T>` | `public static Map<Integer, T>` | `indexed(T[] self)` Zips an object array with indices in (index, value) order starting from index 0.
    `<T>` | `public static Map<Integer, T>` | `indexed(T[] self, int offset)` Zips an object array with indices in (index, value) order starting from a given index.
    `` | `public static boolean[]` | `init(boolean[] self)` Returns the items from the boolean array excluding the last item.
    `` | `public static byte[]` | `init(byte[] self)` Returns the items from the byte array excluding the last item.
    `` | `public static char[]` | `init(char[] self)` Returns the items from the char array excluding the last item.
    `` | `public static short[]` | `init(short[] self)` Returns the items from the short array excluding the last item.
    `` | `public static int[]` | `init(int[] self)` Returns the items from the int array excluding the last item.
    `` | `public static long[]` | `init(long[] self)` Returns the items from the long array excluding the last item.
    `` | `public static float[]` | `init(float[] self)` Returns the items from the float array excluding the last item.
    `` | `public static double[]` | `init(double[] self)` Returns the items from the double array excluding the last item.
    `<T>` | `public static T[]` | `init(T[] self)` Returns the items from the Object array excluding the last item.
    `<E extends T, T, V extends T>` | `public static T` | `inject(E[] self, Closure<V> closure)` Iterates through the given array, passing the first two elements to the closure.
    `<E, T, U extends T, V extends T>` | `public static T` | `inject(E[] self, U initialValue, Closure<V> closure)` Iterates through the given array, passing in the initial value and the first element to the closure.
    `<E extends T, T, V extends T>` | `public static List<T>` | `injectAll(E[] self, Closure<V> closure)` Iterates through the given array, injecting values as per `inject` but returns the list of all calculated values instead of just the final result.
    `<E, T, U extends T, V extends T>` | `public static List<T>` | `injectAll(E[] self, U initialValue, Closure<V> closure)` Iterates through the given array, injecting values as per `inject` but returns the list of all calculated values instead of just the final result.
    `<T>` | `public static Iterator<T>` | `iterator(T[] self)` Returns an Iterator which traverses the given array in index order.
    `` | `public static String` | `join(boolean[] self)` Concatenates the string representation of each item in this array.
    `` | `public static String` | `join(byte[] self)` Concatenates the string representation of each item in this array.
    `` | `public static String` | `join(char[] self)` Concatenates the string representation of each item in this array.
    `` | `public static String` | `join(short[] self)` Concatenates the string representation of each item in this array.
    `` | `public static String` | `join(int[] self)` Concatenates the string representation of each item in this array.
    `` | `public static String` | `join(long[] self)` Concatenates the string representation of each item in this array.
    `` | `public static String` | `join(float[] self)` Concatenates the string representation of each item in this array.
    `` | `public static String` | `join(double[] self)` Concatenates the string representation of each item in this array.
    `` | `public static String` | `join(Object[] self)` Concatenates the string representation of each item in this array.
    `` | `public static String` | `join(boolean[] self, String separator)` Concatenates the string representation of each item in this array, with the given String as a separator between each item.
    `` | `public static String` | `join(byte[] self, String separator)` Concatenates the string representation of each item in this array, with the given String as a separator between each item.
    `` | `public static String` | `join(char[] self, String separator)` Concatenates the string representation of each item in this array, with the given String as a separator between each item.
    `` | `public static String` | `join(short[] self, String separator)` Concatenates the string representation of each item in this array, with the given String as a separator between each item.
    `` | `public static String` | `join(int[] self, String separator)` Concatenates the string representation of each item in this array, with the given String as a separator between each item.
    `` | `public static String` | `join(long[] self, String separator)` Concatenates the string representation of each item in this array, with the given String as a separator between each item.
    `` | `public static String` | `join(float[] self, String separator)` Concatenates the string representation of each item in this array, with the given String as a separator between each item.
    `` | `public static String` | `join(double[] self, String separator)` Concatenates the string representation of each item in this array, with the given String as a separator between each item.
    `` | `public static String` | `join(Object[] self, String separator)` Concatenates the string representation of each item in this array, with the given String as a separator between each item.
    `` | `public static boolean` | `last(boolean[] self)` Returns the last item from the boolean array.
    `` | `public static byte` | `last(byte[] self)` Returns the last item from the byte array.
    `` | `public static char` | `last(char[] self)` Returns the last item from the char array.
    `` | `public static short` | `last(short[] self)` Returns the last item from the short array.
    `` | `public static int` | `last(int[] self)` Returns the last item from the int array.
    `` | `public static long` | `last(long[] self)` Returns the last item from the long array.
    `` | `public static float` | `last(float[] self)` Returns the last item from the float array.
    `` | `public static double` | `last(double[] self)` Returns the last item from the double array.
    `<T>` | `public static T` | `last(T[] self)` Returns the last item from the array.
    `` | `public static int` | `lastIndexOf(Object[] self, Object object)` Returns the index of the last occurrence of the specified element in the array.
    `` | `public static int` | `max(int[] self)` Adds max() method to int arrays.
    `` | `public static long` | `max(long[] self)` Adds max() method to long arrays.
    `` | `public static float` | `max(float[] self)` Adds max() method to float arrays.
    `` | `public static double` | `max(double[] self)` Adds max() method to double arrays.
    `<T>` | `public static T` | `max(T[] self)` Adds max() method to Object arrays.
    `` | `public static int` | `max(int[] self, IntComparator comparator)` Selects the maximum value found from the int array using the supplied IntComparator to determine the maximum of any two values.
    `` | `public static int` | `max(int[] self, IntUnaryOperator operator)` Selects the maximum value found from the int array using the supplied IntUnaryOperator to determine the maximum of any two values.
    `` | `public static long` | `max(long[] self, LongComparator comparator)` Selects the maximum value found from the long array using the supplied LongBinaryOperator as a comparator to determine the maximum of any two values.
    `` | `public static long` | `max(long[] self, LongUnaryOperator operator)` Selects the maximum value found from the long array using the supplied LongUnaryOperator to determine the maximum of any two values.
    `` | `public static float` | `max(float[] self, FloatComparator comparator)` Selects the maximum value found from the float array using the supplied FloatComparator to determine the maximum of any two values.
    `` | `public static float` | `max(float[] self, FloatUnaryOperator operator)` Selects the maximum value found from the float array using the supplied FloatUnaryOperator to determine the maximum of any two values.
    `` | `public static double` | `max(double[] self, DoubleComparator comparator)` Selects the maximum value found from the double array using the supplied DoubleComparator to determine the maximum of any two values.
    `` | `public static double` | `max(double[] self, DoubleUnaryOperator operator)` Selects the maximum value found from the double array using the supplied DoubleUnaryOperator to determine the maximum of any two values.
    `<T>` | `public static T` | `max(T[] self, Comparator<? super T> comparator)` Selects the maximum value found from the Object array using the given comparator.
    `<T>` | `public static T` | `max(T[] self, Closure<?> closure)` Selects the maximum value found from the Object array using the closure to determine the correct ordering.
    `` | `public static int` | `maxComparing(int[] self, Comparator<Integer> comparator)` Selects the maximum value found from the int array using the comparator to determine the maximum of any two values.
    `` | `public static long` | `maxComparing(long[] self, Comparator<Long> comparator)` Selects the maximum value found from the long array using the comparator to determine the maximum of any two values.
    `` | `public static float` | `maxComparing(float[] self, Comparator<Float> comparator)` Selects the maximum value found from the float array using the comparator to determine the maximum of any two values.
    `` | `public static double` | `maxComparing(double[] self, Comparator<Double> comparator)` Selects the maximum value found from the double array using the comparator to determine the maximum of any two values.
    `` | `public static int` | `min(int[] self)` Adds min() method to int arrays.
    `` | `public static long` | `min(long[] self)` Adds min() method to long arrays.
    `` | `public static float` | `min(float[] self)` Adds min() method to float arrays.
    `` | `public static double` | `min(double[] self)` Adds min() method to double arrays.
    `<T>` | `public static T` | `min(T[] self)` Adds min() method to Object arrays.
    `` | `public static int` | `min(int[] self, IntComparator comparator)` Selects the minimum value found from the int array using the supplied IntComparator to determine the minimum of any two values.
    `` | `public static int` | `min(int[] self, IntUnaryOperator operator)` Selects the minimum value found from the int array using the supplied IntUnaryOperator to determine the minimum of any two values.
    `` | `public static long` | `min(long[] self, LongComparator comparator)` Selects the minimum value found from the long array using the supplied LongComparator to determine the minimum of any two values.
    `` | `public static long` | `min(long[] self, LongUnaryOperator operator)` Selects the minimum value found from the long array using the supplied LongUnaryOperator to determine the minimum of any two values.
    `` | `public static float` | `min(float[] self, FloatComparator comparator)` Selects the minimum value found from the float array using the supplied FloatComparator to determine the minimum of any two values.
    `` | `public static float` | `min(float[] self, FloatUnaryOperator operator)` Selects the minimum value found from the float array using the supplied FloatUnaryOperator to determine the minimum of any two values.
    `` | `public static double` | `min(double[] self, DoubleComparator comparator)` Selects the minimum value found from the double array using the supplied DoubleComparator to determine the minimum of any two values.
    `` | `public static double` | `min(double[] self, DoubleUnaryOperator operator)` Selects the minimum value found from the double array using the supplied DoubleUnaryOperator to determine the minimum of any two values.
    `<T>` | `public static T` | `min(T[] self, Comparator<? super T> comparator)` Selects the minimum value found from the Object array using the given comparator.
    `<T>` | `public static T` | `min(T[] self, Closure<?> closure)` Selects the minimum value found from the Object array using the closure to determine the correct ordering.
    `` | `public static int` | `minComparing(int[] self, Comparator<Integer> comparator)` Selects the minimum value found from the int array using the comparator to determine the minimum of any two values.
    `` | `public static long` | `minComparing(long[] self, Comparator<Long> comparator)` Selects the minimum value found from the long array using the comparator to determine the minimum of any two values.
    `` | `public static float` | `minComparing(float[] self, Comparator<Float> comparator)` Selects the minimum value found from the float array using the comparator to determine the minimum of any two values.
    `` | `public static double` | `minComparing(double[] self, Comparator<Double> comparator)` Selects the minimum value found from the double array using the comparator to determine the minimum of any two values.
    `<T>` | `public static T[]` | `minus(T[] self, Iterable<?> removeMe)` Creates a new array composed of the elements of the first array minus the elements of the given Iterable.
    `<T>` | `public static T[]` | `minus(T[] self, Object[] removeMe)` Creates a new array composed of the elements of the first array minus the elements of the given array.
    `<T>` | `public static T[]` | `minus(T[] self, Object removeMe)` Creates a new array composed of the elements of the given array minus every occurrence the given object.
    `<T>` | `public static int` | `partitionPoint(T[] self, IntRange range, Predicate<T> condition)` Returns the index of the partition point according to the given predicate (the index of the first element of the second partition).
    `<T>` | `public static int` | `partitionPoint(T[] self, Predicate<T> condition)` Returns the index of the partition point according to the given predicate (the index of the first element of the second partition).
    `` | `public static int` | `partitionPoint(char[] self, IntRange range, IntPredicate condition)` Returns the index of the partition point according to the given predicate (the index of the first element of the second partition).
    `` | `public static int` | `partitionPoint(char[] self, IntPredicate condition)` Returns the index of the partition point according to the given predicate (the index of the first element of the second partition).
    `` | `public static int` | `partitionPoint(short[] self, IntRange range, IntPredicate condition)` Returns the index of the partition point according to the given predicate (the index of the first element of the second partition).
    `` | `public static int` | `partitionPoint(short[] self, IntPredicate condition)` Returns the index of the partition point according to the given predicate (the index of the first element of the second partition).
    `` | `public static int` | `partitionPoint(int[] self, IntRange range, IntPredicate condition)` Returns the index of the partition point according to the given predicate (the index of the first element of the second partition).
    `` | `public static int` | `partitionPoint(int[] self, IntPredicate condition)` Returns the index of the partition point according to the given predicate (the index of the first element of the second partition).
    `` | `public static int` | `partitionPoint(long[] self, IntRange range, LongPredicate condition)` Returns the index of the partition point according to the given predicate (the index of the first element of the second partition).
    `` | `public static int` | `partitionPoint(long[] self, LongPredicate condition)` Returns the index of the partition point according to the given predicate (the index of the first element of the second partition).
    `` | `public static int` | `partitionPoint(float[] self, IntRange range, DoublePredicate condition)` Returns the index of the partition point according to the given predicate (the index of the first element of the second partition).
    `` | `public static int` | `partitionPoint(float[] self, DoublePredicate condition)` Returns the index of the partition point according to the given predicate (the index of the first element of the second partition).
    `` | `public static int` | `partitionPoint(double[] self, IntRange range, DoublePredicate condition)` Returns the index of the partition point according to the given predicate (the index of the first element of the second partition).
    `` | `public static int` | `partitionPoint(double[] self, DoublePredicate condition)` Returns the index of the partition point according to the given predicate (the index of the first element of the second partition).
    `<T>` | `public static T[]` | `plus(T[] left, Collection<?> right)` Creates an array containing elements from an original array plus those from a Collection.
    `<T>` | `public static T[]` | `plus(T[] left, Iterable<?> right)` Creates an array containing elements from an original array plus those from an Iterable.
    `<T>` | `public static T[]` | `plus(T[] left, Object[] right)` Creates an array as a union of two arrays.
    `<T>` | `public static T[]` | `plus(T[] left, Object right)` Creates an array containing elements from an original array plus an additional appended element.
    `<T>` | `public static void` | `putAt(T[] self, IntRange range, T[] source)` A helper method to allow arrays to be set with subscript operators.
    `<T>` | `public static void` | `putAt(T[] self, IntRange range, Iterable<T> source)` A helper method to allow arrays to be set with subscript operators.
    `` | `public static void` | `putAt(boolean[] self, IntRange range, boolean[] source)` A helper method to allow arrays to be set with subscript operators.
    `` | `public static void` | `putAt(boolean[] self, IntRange range, Iterable<Boolean> source)` A helper method to allow arrays to be set with subscript operators.
    `` | `public static void` | `putAt(byte[] self, IntRange range, byte[] source)` A helper method to allow arrays to be set with subscript operators.
    `` | `public static void` | `putAt(byte[] self, IntRange range, Iterable<Number> source)` A helper method to allow arrays to be set with subscript operators.
    `` | `public static void` | `putAt(char[] self, IntRange range, char[] source)` A helper method to allow arrays to be set with subscript operators.
    `` | `public static void` | `putAt(char[] self, IntRange range, Iterable<Character> source)` A helper method to allow arrays to be set with subscript operators.
    `` | `public static void` | `putAt(short[] self, IntRange range, short[] source)` A helper method to allow arrays to be set with subscript operators.
    `` | `public static void` | `putAt(short[] self, IntRange range, Iterable<Number> source)` A helper method to allow arrays to be set with subscript operators.
    `` | `public static void` | `putAt(int[] self, IntRange range, int[] source)` A helper method to allow arrays to be set with subscript operators.
    `` | `public static void` | `putAt(int[] self, IntRange range, Iterable<Number> source)` A helper method to allow arrays to be set with subscript operators.
    `` | `public static void` | `putAt(long[] self, IntRange range, long[] source)` A helper method to allow arrays to be set with subscript operators.
    `` | `public static void` | `putAt(long[] self, IntRange range, Iterable<Number> source)` A helper method to allow arrays to be set with subscript operators.
    `` | `public static void` | `putAt(float[] self, IntRange range, float[] source)` A helper method to allow arrays to be set with subscript operators.
    `` | `public static void` | `putAt(float[] self, IntRange range, Iterable<Number> source)` A helper method to allow arrays to be set with subscript operators.
    `` | `public static void` | `putAt(double[] self, IntRange range, double[] source)` A helper method to allow arrays to be set with subscript operators.
    `` | `public static void` | `putAt(double[] self, IntRange range, Iterable<Number> source)` A helper method to allow arrays to be set with subscript operators.
    `` | `public static boolean[]` | `reverse(boolean[] self)` Creates a new boolean array containing items which are the same as this array but in reverse order.
    `` | `public static boolean[]` | `reverse(boolean[] self, boolean mutate)` Reverses the items in an array.
    `` | `public static byte[]` | `reverse(byte[] self)` Creates a new byte array containing items which are the same as this array but in reverse order.
    `` | `public static byte[]` | `reverse(byte[] self, boolean mutate)` Reverses the items in an array.
    `` | `public static char[]` | `reverse(char[] self)` Creates a new char array containing items which are the same as this array but in reverse order.
    `` | `public static char[]` | `reverse(char[] self, boolean mutate)` Reverses the items in an array.
    `` | `public static short[]` | `reverse(short[] self)` Creates a new short array containing items which are the same as this array but in reverse order.
    `` | `public static short[]` | `reverse(short[] self, boolean mutate)` Reverses the items in an array.
    `` | `public static int[]` | `reverse(int[] self)` Creates a new int array containing items which are the same as this array but in reverse order.
    `` | `public static int[]` | `reverse(int[] self, boolean mutate)` Reverses the items in an array.
    `` | `public static long[]` | `reverse(long[] self)` Creates a new long array containing items which are the same as this array but in reverse order.
    `` | `public static long[]` | `reverse(long[] self, boolean mutate)` Reverses the items in an array.
    `` | `public static float[]` | `reverse(float[] self)` Creates a new float array containing items which are the same as this array but in reverse order.
    `` | `public static float[]` | `reverse(float[] self, boolean mutate)` Reverses the items in an array.
    `` | `public static double[]` | `reverse(double[] self)` Creates a new double array containing items which are the same as this array but in reverse order.
    `` | `public static double[]` | `reverse(double[] self, boolean mutate)` Reverses the items in an array.
    `<T>` | `public static T[]` | `reverse(T[] self)` Creates a new array containing items which are the same as this array but in reverse order.
    `<T>` | `public static T[]` | `reverse(T[] self, boolean mutate)` Reverses the items in an array.
    `` | `public static boolean[]` | `reverseEach(boolean[] self, Closure<?> closure)` Iterates through a boolean[] in reverse order passing each boolean to the given closure.
    `` | `public static byte[]` | `reverseEach(byte[] self, Closure<?> closure)` Iterates through a byte[] in reverse order passing each byte to the given closure.
    `` | `public static char[]` | `reverseEach(char[] self, Closure<?> closure)` Iterates through a char[] in reverse order passing each char to the given closure.
    `` | `public static short[]` | `reverseEach(short[] self, Closure<?> closure)` Iterates through a short[] in reverse order passing each short to the given closure.
    `` | `public static int[]` | `reverseEach(int[] self, Closure<?> closure)` Iterates through an int[] in reverse order passing each int to the given closure.
    `` | `public static long[]` | `reverseEach(long[] self, Closure<?> closure)` Iterates through a long[] in reverse order passing each long to the given closure.
    `` | `public static float[]` | `reverseEach(float[] self, Closure<?> closure)` Iterates through a float[] in reverse order passing each float to the given closure.
    `` | `public static double[]` | `reverseEach(double[] self, Closure<?> closure)` Iterates through a double[] in reverse order passing each double to the given closure.
    `<T>` | `public static T[]` | `reverseEach(T[] self, Closure<?> closure)` Iterates over each element of the array in the reverse order.
    `<T>` | `public static void` | `shuffle(T[] self)` Randomly reorders the elements of the specified array.
    `<T>` | `public static void` | `shuffle(T[] self, Random rnd)` Randomly reorders the elements of the specified array using the specified random instance as the source of randomness.
    `<T>` | `public static T[]` | `shuffled(T[] self)` Creates a new array containing the elements of the specified array but in a random order.
    `<T>` | `public static T[]` | `shuffled(T[] self, Random rnd)` Creates a new array containing the elements of the specified array but in a random order using the specified random instance as the source of randomness.
    `` | `public static int` | `size(boolean[] self)` Provides arrays with a `size` method similar to collections.
    `` | `public static int` | `size(byte[] self)` Provides arrays with a `size` method similar to collections.
    `` | `public static int` | `size(char[] self)` Provides arrays with a `size` method similar to collections.
    `` | `public static int` | `size(short[] self)` Provides arrays with a `size` method similar to collections.
    `` | `public static int` | `size(int[] self)` Provides arrays with a `size` method similar to collections.
    `` | `public static int` | `size(long[] self)` Provides arrays with a `size` method similar to collections.
    `` | `public static int` | `size(float[] self)` Provides arrays with a `size` method similar to collections.
    `` | `public static int` | `size(double[] self)` Provides arrays with a `size` method similar to collections.
    `` | `public static int` | `size(Object[] self)` Provides the standard Groovy `size()` method for an array.
    `<T>` | `public static T[]` | `sort(T[] self)` Modifies this array so that its elements are in sorted order.
    `<T>` | `public static T[]` | `sort(T[] self, boolean mutate)` Sorts the given array into sorted order.
    `<T>` | `public static T[]` | `sort(T[] self, Comparator<? super T> comparator)` Sorts the given array into sorted order using the given comparator.
    `<T>` | `public static T[]` | `sort(T[] self, boolean mutate, Comparator<? super T> comparator)` Sorts the elements from this array into sorted order as determined by the given comparator.
    `<T>` | `public static T[]` | `sort(T[] self, Closure<?> closure)` Sorts the elements from this array into a newly created array using the Closure to determine the correct ordering.
    `<T>` | `public static T[]` | `sort(T[] self, IntRange range, Closure<?> closure)` Sorts the elements from this array with index values in the given index range into a newly created array using the Closure to determine the correct ordering.
    `<T>` | `public static T[]` | `sort(T[] self, boolean mutate, Closure<?> closure)` Sorts the elements from this array into sorted order using the Closure to determine the correct ordering.
    `<T>` | `public static T[]` | `sort(T[] self, IntRange range, boolean mutate, Closure<?> closure)` Sorts the elements with index values in the given index range into sorted order using the Closure to determine the correct ordering.
    `<T>` | `public static Collection<Collection<T>>` | `split(T[] self, Closure<?> closure)` Splits all items into two collections based on the closure condition.
    `` | `public static byte` | `sum(byte[] self)` Sums the items in an array.
    `` | `public static char` | `sum(char[] self)` Sums the items in an array.
    `` | `public static short` | `sum(short[] self)` Sums the items in an array.
    `` | `public static int` | `sum(int[] self)` Sums the items in an array.
    `` | `public static int` | `sum(int[] self, IntUnaryOperator operator)` Calculates the sum of values found from applying the operator to members of the int array.
    `` | `public static long` | `sum(long[] self)` Sums the items in an array.
    `` | `public static long` | `sum(long[] self, LongUnaryOperator operator)` Calculates the sum of values found from applying the operator to members of the int array.
    `` | `public static float` | `sum(float[] self)` Sums the items in an array.
    `` | `public static float` | `sum(float[] self, FloatUnaryOperator operator)` Calculates the sum of values found from applying the operator to members of the float array.
    `` | `public static double` | `sum(double[] self)` Sums the items in an array.
    `` | `public static double` | `sum(double[] self, DoubleUnaryOperator operator)` Calculates the sum of values found from applying the operator to members of the int array.
    `` | `public static Object` | `sum(Object[] self)` Sums the items in an array.
    `` | `public static byte` | `sum(byte[] self, byte initialValue)` Sums the items in an array, adding the result to some initial value.
    `` | `public static char` | `sum(char[] self, char initialValue)` Sums the items in an array, adding the result to some initial value.
    `` | `public static short` | `sum(short[] self, short initialValue)` Sums the items in an array, adding the result to some initial value.
    `` | `public static int` | `sum(int[] self, int initialValue)` Sums the items in an array, adding the result to some initial value.
    `` | `public static long` | `sum(long[] self, long initialValue)` Sums the items in an array, adding the result to some initial value.
    `` | `public static float` | `sum(float[] self, float initialValue)` Sums the items in an array, adding the result to some initial value.
    `` | `public static double` | `sum(double[] self, double initialValue)` Sums the items in an array, adding the result to some initial value.
    `` | `public static Object` | `sum(Object[] self, Object initialValue)` Sums the items in an array, adding the result to some initial value.
    `<T>` | `public static Object` | `sum(T[] self, Closure<?> closure)` Sums the result of applying a closure to each item of an array.
    `<T>` | `public static Object` | `sum(T[] self, Object initialValue, Closure<?> closure)` Sums the result of applying a closure to each item of an array to some initial value.
    `` | `public static boolean[]` | `swap(boolean[] self, int i, int j)` Swaps two elements at the specified positions.
    `` | `public static byte[]` | `swap(byte[] self, int i, int j)` Swaps two elements at the specified positions.
    `` | `public static char[]` | `swap(char[] self, int i, int j)` Swaps two elements at the specified positions.
    `` | `public static short[]` | `swap(short[] self, int i, int j)` Swaps two elements at the specified positions.
    `` | `public static int[]` | `swap(int[] self, int i, int j)` Swaps two elements at the specified positions.
    `` | `public static long[]` | `swap(long[] self, int i, int j)` Swaps two elements at the specified positions.
    `` | `public static float[]` | `swap(float[] self, int i, int j)` Swaps two elements at the specified positions.
    `` | `public static double[]` | `swap(double[] self, int i, int j)` Swaps two elements at the specified positions.
    `<T>` | `public static T[]` | `swap(T[] self, int i, int j)` Swaps two elements at the specified positions.
    `` | `public static boolean[]` | `tail(boolean[] self)` Returns the items from the boolean array excluding the first item.
    `` | `public static byte[]` | `tail(byte[] self)` Returns the items from the byte array excluding the first item.
    `` | `public static char[]` | `tail(char[] self)` Returns the items from the char array excluding the first item.
    `` | `public static short[]` | `tail(short[] self)` Returns the items from the short array excluding the first item.
    `` | `public static int[]` | `tail(int[] self)` Returns the items from the int array excluding the first item.
    `` | `public static long[]` | `tail(long[] self)` Returns the items from the long array excluding the first item.
    `` | `public static float[]` | `tail(float[] self)` Returns the items from the float array excluding the first item.
    `` | `public static double[]` | `tail(double[] self)` Returns the items from the double array excluding the first item.
    `<T>` | `public static T[]` | `tail(T[] self)` Returns the items from the array excluding the first item.
    `<T>` | `public static T[]` | `take(T[] self, int num)` Returns the first `num` elements from the head of this array.
    `<T>` | `public static T[]` | `takeRight(T[] self, int num)` Returns the last `num` elements from the tail of this array.
    `<T>` | `public static T[]` | `takeWhile(T[] self, Closure<?> condition)` Returns the longest prefix of this array where each element passed to the given closure evaluates to true.
    `` | `public static List<Boolean>` | `toList(boolean[] self)` Converts this array to a List of the same size, with each element added to the list.
    `` | `public static List<Byte>` | `toList(byte[] self)` Converts this array to a List of the same size, with each element added to the list.
    `` | `public static List<Character>` | `toList(char[] self)` Converts this array to a List of the same size, with each element added to the list.
    `` | `public static List<Short>` | `toList(short[] self)` Converts this array to a List of the same size, with each element added to the list.
    `` | `public static List<Integer>` | `toList(int[] self)` Converts this array to a List of the same size, with each element added to the list.
    `` | `public static List<Long>` | `toList(long[] self)` Converts this array to a List of the same size, with each element added to the list.
    `` | `public static List<Float>` | `toList(float[] self)` Converts this array to a List of the same size, with each element added to the list.
    `` | `public static List<Double>` | `toList(double[] self)` Converts this array to a List of the same size, with each element added to the list.
    `<T>` | `public static List<T>` | `toList(T[] self)` Converts this array to a List of the same size, with each element added to the list.
    `` | `public static Set<Boolean>` | `toSet(boolean[] self)` Converts this array to a Set, with each unique element added to the set.
    `` | `public static Set<Byte>` | `toSet(byte[] self)` Converts this array to a Set, with each unique element added to the set.
    `` | `public static Set<Character>` | `toSet(char[] self)` Converts this array to a Set, with each unique element added to the set.
    `` | `public static Set<Short>` | `toSet(short[] self)` Converts this array to a Set, with each unique element added to the set.
    `` | `public static Set<Integer>` | `toSet(int[] self)` Converts this array to a Set, with each unique element added to the set.
    `` | `public static Set<Long>` | `toSet(long[] self)` Converts this array to a Set, with each unique element added to the set.
    `` | `public static Set<Float>` | `toSet(float[] self)` Converts this array to a Set, with each unique element added to the set.
    `` | `public static Set<Double>` | `toSet(double[] self)` Converts this array to a Set, with each unique element added to the set.
    `<T>` | `public static Set<T>` | `toSet(T[] self)` Converts this array to a Set, with each unique element added to the set.
    `<T>` | `public static T[]` | `toSorted(T[] self)` Returns a sorted version of the given array using the supplied comparator.
    `<T>` | `public static T[]` | `toSorted(T[] self, Comparator<? super T> comparator)` Returns a sorted version of the given array using the supplied comparator to determine the resulting order.
    `<T>` | `public static T[]` | `toSorted(T[] self, Closure<?> closure)` Sorts the elements from this array into a newly created array using the Closure to determine the correct ordering.
    `` | `public static SpreadMap` | `toSpreadMap(Object[] self)` Creates a spreadable map from this array.
    `` | `public static String` | `toString(boolean[] self)` Returns the string representation of the given array.
    `` | `public static String` | `toString(byte[] self)` Returns the string representation of the given array.
    `` | `public static String` | `toString(char[] self)` Returns the string representation of the given array.
    `` | `public static String` | `toString(short[] self)` Returns the string representation of the given array.
    `` | `public static String` | `toString(int[] self)` Returns the string representation of the given array.
    `` | `public static String` | `toString(long[] self)` Returns the string representation of the given array.
    `` | `public static String` | `toString(float[] self)` Returns the string representation of the given array.
    `` | `public static String` | `toString(double[] self)` Returns the string representation of the given array.
    `` | `public static String` | `toString(Object[] self)` Returns the string representation of the given array.
    `<T>` | `public static T[]` | `toUnique(T[] self)` Returns a new Array containing the items from the original Array but with duplicates removed using the natural ordering of the items in the array.
    `<T>` | `public static T[]` | `toUnique(T[] self, Comparator<? super T> comparator)` Returns a new Array containing the items from the original Array but with duplicates removed with the supplied comparator determining which items are unique.
    `<T>` | `public static T[]` | `toUnique(T[] self, Closure<?> closure)` Returns a new Array containing the items from the original Array but with duplicates removed with the supplied closure determining which items are unique.
    `` | `public static boolean` | `transpose(boolean self)` A transpose method for 2D boolean arrays.
    `` | `public static byte` | `transpose(byte self)` A transpose method for 2D byte arrays.
    `` | `public static char` | `transpose(char self)` A transpose method for 2D char arrays.
    `` | `public static short` | `transpose(short self)` A transpose method for 2D short arrays.
    `` | `public static int` | `transpose(int self)` A transpose method for 2D int arrays.
    `` | `public static long` | `transpose(long self)` A transpose method for 2D long arrays.
    `` | `public static float` | `transpose(float self)` A transpose method for 2D float arrays.
    `` | `public static double` | `transpose(double self)` A transpose method for 2D double arrays.
    `` | `public static Iterator<double[]>` | `transposing(double self)` An iterator of the columns of the array.
    `` | `public static Iterator<float[]>` | `transposing(float self)` An iterator of the columns of the array.
    `` | `public static Iterator<int[]>` | `transposing(int self)` An iterator of the columns of the array.
    `` | `public static Iterator<long[]>` | `transposing(long self)` An iterator of the columns of the array.
    `` | `public static Object[]` | `union(Object[] left, Collection<?> right)` Creates an object array containing elements from an original array plus those from a Collection.
    `` | `public static Object[]` | `union(Object[] left, Iterable<?> right)` Creates an Object array containing elements from an original array plus those from an Iterable.
    `` | `public static Object[]` | `union(Object[] left, Object[] right)` Creates an Object array as a union of two arrays.
    `` | `public static Object[]` | `union(Object[] left, Object right)` Creates an Object array containing elements from an original array plus an additional appended element.
    `<K, V>` | `public static Map<K, V>` | `withCollectedKeys(V[] values, Function<? super V, K> keyTransform)` A variant of withCollectedKeys for arrays.
    `<K, V>` | `public static Map<K, V>` | `withCollectedKeys(V[] values, Map<K, V> collector, Function<? super V, K> keyTransform)` A variant of withCollectedKeys for arrays.
    `<K, V>` | `public static Map<K, V>` | `withCollectedValues(K[] keys, Function<? super K, V> valueTransform)` A variant of withCollectedValues for arrays.
    `<K, V>` | `public static Map<K, V>` | `withCollectedValues(K[] keys, Map<K, V> collector, Function<? super K, V> valueTransform)` A variant of withCollectedValues for arrays.
    `` | `public static List<Tuple2<Integer, Integer>>` | `withIndex(int[] self)` Zips an int array with indices in (value, index) order.
    `` | `public static List<Tuple2<Integer, Integer>>` | `withIndex(int[] self, int offset)` Zips an int array with indices in (value, index) order starting from a given index.
    `` | `public static List<Tuple2<Long, Integer>>` | `withIndex(long[] self)` Zips a long array with indices in (value, index) order.
    `` | `public static List<Tuple2<Long, Integer>>` | `withIndex(long[] self, int offset)` Zips a long array with indices in (value, index) order starting from a given index.
    `` | `public static List<Tuple2<Float, Integer>>` | `withIndex(float[] self)` Zips a float array with indices in (value, index) order.
    `` | `public static List<Tuple2<Float, Integer>>` | `withIndex(float[] self, int offset)` Zips a float array with indices in (value, index) order starting from a given index.
    `` | `public static List<Tuple2<Double, Integer>>` | `withIndex(double[] self)` Zips a double array with indices in (value, index) order.
    `` | `public static List<Tuple2<Double, Integer>>` | `withIndex(double[] self, int offset)` Zips a double array with indices in (value, index) order starting from a given index.
    `<T>` | `public static List<Tuple2<T, Integer>>` | `withIndex(T[] self)` Zips an object array with indices in (value, index) order.
    `<T>` | `public static List<Tuple2<T, Integer>>` | `withIndex(T[] self, int offset)` Zips an object array with indices in (value, index) order starting from a given index.
    `` | `public static List<Tuple2<Double, Double>>` | `zip(double[] self, double[] other)` A list of all the pairs from two arrays.
    `` | `public static List<Tuple2<Float, Float>>` | `zip(float[] self, float[] other)` A list of all the pairs from two arrays.
    `` | `public static List<Tuple2<Integer, Integer>>` | `zip(int[] self, int[] other)` A list of all the pairs from two arrays.
    `` | `public static List<Tuple2<Long, Long>>` | `zip(long[] self, long[] other)` A list of all the pairs from two arrays.
    `` | `public static Iterator<Tuple2<Double, Double>>` | `zipping(double[] self, double[] other)` An iterator of all the pairs from two arrays.
    `` | `public static Iterator<Tuple2<Float, Float>>` | `zipping(float[] self, float[] other)` An iterator of all the pairs from two arrays.
    `` | `public static Iterator<Tuple2<Integer, Integer>>` | `zipping(int[] self, int[] other)` An iterator of all the pairs from two arrays.
    `` | `public static Iterator<Tuple2<Long, Long>>` | `zipping(long[] self, long[] other)` An iterator of all the pairs from two arrays.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class DefaultGroovyMethodsSupport` | `cloneSimilarCollection, cloneSimilarMap, closeQuietly, closeWithWarning, createSimilarArray, createSimilarCollection, createSimilarCollection, createSimilarCollection, createSimilarList, createSimilarMap, createSimilarOrDefaultCollection, createSimilarQueue, createSimilarSet, normaliseIndex, sameType, sameType, subListBorders, subListBorders, subListRange, writeUTF16BomIfRequired, writeUTF16BomIfRequired, writeUTF16BomIfRequired, writeUTF16BomIfRequired`

- - ### Method Detail

    - #### public static boolean any(boolean[] self)

      Iterates over the contents of a boolean Array, and checks whether any element is true.

           boolean[] array1 = [false, true]
           assert array1.any()
           boolean[] array2 = [false]
           assert !array2.any()

      Parameters:
        `self` - the boolean array over which we iterate
      Returns:
        true if any boolean is true
      Since:
        5.0.0

    - #### public static boolean any(boolean[] self, @ClosureParams(FirstParam.Component.class)
      Closure<?> predicate)

      Iterates over the contents of a boolean Array, and checks whether a predicate is valid for at least one element.

           boolean[] array = [true]
           assert array.any{ it }
           assert !array.any{ !it }

      Parameters:
        `self` - the boolean array over which we iterate
        `predicate` - the closure predicate used for matching
      Returns:
        true if any iteration for the booleans matches the closure predicate
      Since:
        5.0.0

    - #### public static boolean any(byte[] self, @ClosureParams(FirstParam.Component.class)
      Closure<?> predicate)

      Iterates over the contents of a byte Array, and checks whether a predicate is valid for at least one element.

           byte[] array = [0, 1, 2]
           assert array.any{ it > 1 }
           assert !array.any{ it > 3 }

      Parameters:
        `self` - the byte array over which we iterate
        `predicate` - the closure predicate used for matching
      Returns:
        true if any iteration for the bytes matches the closure predicate
      Since:
        5.0.0

    - #### public static boolean any(char[] self, @ClosureParams(FirstParam.Component.class)
      Closure<?> predicate)

      Iterates over the contents of a char Array, and checks whether a predicate is valid for at least one element.

           char[] array = ['a', 'b', 'c']
           assert array.any{ it <= 'a' }
           assert !array.any{ it < 'a' }

      Parameters:
        `self` - the char array over which we iterate
        `predicate` - the closure predicate used for matching
      Returns:
        true if any iteration for the chars matches the closure predicate
      Since:
        5.0.0

    - #### public static boolean any(short[] self, @ClosureParams(FirstParam.Component.class)
      Closure<?> predicate)

      Iterates over the contents of a short Array, and checks whether a predicate is valid for at least one element.

           short[] array = [0, 1, 2]
           assert array.any{ it > 1 }
           assert !array.any{ it > 3 }

      Parameters:
        `self` - the char array over which we iterate
        `predicate` - the closure predicate used for matching
      Returns:
        true if any iteration for the shorts matches the closure predicate
      Since:
        5.0.0

    - #### public static boolean any(int[] self, @ClosureParams(FirstParam.Component.class)
      Closure<?> predicate)

      Iterates over the contents of an int Array, and checks whether a predicate is valid for at least one element.

           int[] array = [0, 1, 2]
           assert array.any{ it > 1 }
           assert !array.any{ it > 3 }

      Parameters:
        `self` - the int array over which we iterate
        `predicate` - the closure predicate used for matching
      Returns:
        true if any iteration for the ints matches the closure predicate
      Since:
        5.0.0

    - #### public static boolean any(long[] self, @ClosureParams(FirstParam.Component.class)
      Closure<?> predicate)

      Iterates over the contents of a long Array, and checks whether a predicate is valid for at least one element.

           long[] array = [0L, 1L, 2L]
           assert array.any{ it > 1L }
           assert !array.any{ it > 3L }

      Parameters:
        `self` - the long array over which we iterate
        `predicate` - the closure predicate used for matching
      Returns:
        true if any iteration for the longs matches the closure predicate
      Since:
        5.0.0

    - #### public static boolean any(float[] self, @ClosureParams(FirstParam.Component.class)
      Closure<?> predicate)

      Iterates over the contents of a float Array, and checks whether a predicate is valid for at least one element.

           float[] array = [0.0f, 1.0f, 2.0f]
           assert array.any{ it > 1.5f }
           assert !array.any{ it > 2.5f }

      Parameters:
        `self` - the float array over which we iterate
        `predicate` - the closure predicate used for matching
      Returns:
        true if any iteration for the floats matches the closure predicate
      Since:
        5.0.0

    - #### public static boolean any(double[] self, @ClosureParams(FirstParam.Component.class)
      Closure<?> predicate)

      Iterates over the contents of a double Array, and checks whether a predicate is valid for at least one element.

           double[] array = [0.0d, 1.0d, 2.0d]
           assert array.any{ it > 1.5d }
           assert !array.any{ it > 2.5d }

      Parameters:
        `self` - the double array over which we iterate
        `predicate` - the closure predicate used for matching
      Returns:
        true if any iteration for the doubles matches the closure predicate
      Since:
        5.0.0

    - #### <T> public static boolean any(T[] self, @ClosureParams(FirstParam.Component.class)
      Closure<?> predicate)

      Iterates over the contents of an Array, and checks whether a predicate is valid for at least one element.

      Parameters:
        `self` - the array over which we iterate
        `predicate` - the closure predicate used for matching
      Returns:
        true if any iteration for the object matches the closure predicate
      Since:
        2.5.0

    - #### public static boolean asBoolean(boolean[] self)

      Coerces a boolean array to a boolean value. A boolean array is false if the array is of length 0, and true otherwise.

      Parameters:
        `self` - an array
      Returns:
        the array's boolean value
      Since:
        1.7.4

    - #### public static boolean asBoolean(byte[] self)

      Coerces a byte array to a boolean value. A byte array is false if the array is null or of length 0, and true otherwise.

           byte[] array1 = []
           assert !array1
           byte[] array2 = [0]
           assert array2

      Parameters:
        `self` - an array
      Returns:
        the array's boolean value
      Since:
        1.7.4

    - #### public static boolean asBoolean(char[] self)

      Coerces a char array to a boolean value. A char array is false if the array is of length 0, and true otherwise.

      Parameters:
        `self` - an array
      Returns:
        the array's boolean value
      Since:
        1.7.4

    - #### public static boolean asBoolean(short[] self)

      Coerces a short array to a boolean value. A short array is false if the array is of length 0, and true otherwise.

      Parameters:
        `self` - an array
      Returns:
        the array's boolean value
      Since:
        1.7.4

    - #### public static boolean asBoolean(int[] self)

      Coerces an int array to a boolean value. An int array is false if the array is of length 0, and true otherwise.

      Parameters:
        `self` - an array
      Returns:
        the array's boolean value
      Since:
        1.7.4

    - #### public static boolean asBoolean(long[] self)

      Coerces a long array to a boolean value. A long array is false if the array is of length 0, and true otherwise.

      Parameters:
        `self` - an array
      Returns:
        the array's boolean value
      Since:
        1.7.4

    - #### public static boolean asBoolean(float[] self)

      Coerces a float array to a boolean value. A float array is false if the array is of length 0, and true otherwise.

      Parameters:
        `self` - an array
      Returns:
        the array's boolean value
      Since:
        1.7.4

    - #### public static boolean asBoolean(double[] self)

      Coerces a double array to a boolean value. A double array is false if the array is of length 0, and true otherwise.

      Parameters:
        `self` - an array
      Returns:
        the array's boolean value
      Since:
        1.7.4

    - #### public static boolean asBoolean(Object[] self)

      Coerces an object array to a boolean value. An Object array is false if the array is of length 0. and to true otherwise

      Parameters:
        `self` - the array
      Returns:
        the boolean value
      Since:
        1.7.0

    - #### <T> @SuppressWarnings("unchecked")
      public static T asType(Object[] self, Class<T> type)

      Converts the given array to either a List, Set, or SortedSet. If the given class is something else, the call is deferred to DefaultGroovyMethods.asType.

      Parameters:
        `self` - an array
        `type` - the desired class
      Returns:
        the object resulting from this type conversion
      Since:
        1.5.1

    - #### public static BigDecimal average(byte[] self)

      Calculates the average of the bytes in the array.

          assert 5.0G == ([2,4,6,8] as byte[]).average()

      Parameters:
        `self` - The array of values to calculate the average of
      Returns:
        The average of the items
      Since:
        3.0.0

    - #### public static BigDecimal average(short[] self)

      Calculates the average of the shorts in the array.

          assert 5.0G == ([2,4,6,8] as short[]).average()

      Parameters:
        `self` - The array of values to calculate the average of
      Returns:
        The average of the items
      Since:
        3.0.0

    - #### public static BigDecimal average(int[] self)

      Calculates the average of the ints in the array.

          assert 5.0G == ([2,4,6,8] as int[]).average()

      Parameters:
        `self` - The array of values to calculate the average of
      Returns:
        The average of the items
      Since:
        3.0.0

    - #### public static BigDecimal average(long[] self)

      Calculates the average of the longs in the array.

          assert 5.0G == ([2,4,6,8] as long[]).average()

      Parameters:
        `self` - The array of values to calculate the average of
      Returns:
        The average of the items
      Since:
        3.0.0

    - #### public static double average(float[] self)

      Calculates the average of the floats in the array.

          assert 5.0d == ([2,4,6,8] as float[]).average()

      Parameters:
        `self` - The array of values to calculate the average of
      Returns:
        The average of the items
      Since:
        3.0.0

    - #### public static double average(double[] self)

      Calculates the average of the doubles in the array.

          assert 5.0d == ([2,4,6,8] as double[]).average()

      Parameters:
        `self` - The array of values to calculate the average of
      Returns:
        The average of the items
      Since:
        3.0.0

    - #### public static Object average(Object[] self)

      Averages the items in an array. This is equivalent to invoking the "plus" method on all items in the array and then dividing by the total count using the "div" method for the resulting sum.

           assert 3 == ([1, 2, 6] as Integer[]).average()

      Parameters:
        `self` - The array of values to average
      Returns:
        The average of all the items
      See Also:
        sum(java.lang.Object[])
      Since:
        3.0.0

    - #### <T> public static Object average(T[] self, @ClosureParams(FirstParam.Component.class)
      Closure<?> closure)

      Averages the result of applying a closure to each item of an array. `array.average(closure)` is equivalent to: `array.collect(closure).average()`.

           def (nums, strings) = [[1, 3] as Integer[], ['to', 'from'] as String[]]
           assert 20 == nums.average { it * 10 }
           assert 3 == strings.average { it.size() }
           assert 3 == strings.average (String::size)

      Parameters:
        `self` - An array
        `closure` - a single parameter closure that returns a (typically) numeric value.
      Returns:
        The average of the values returned by applying the closure to each item of the array.
      Since:
        3.0.0

    - #### public static List<List<Boolean>> chop(boolean[] self, int chopSizes)

      Chops the boolean array into pieces, returning lists with sizes corresponding to the supplied chop sizes. If the array isn't large enough, truncated (possibly empty) pieces are returned. Using a chop size of -1 will cause that piece to contain all remaining items from the array.

           boolean[] array = [false, true, false]
           assert array.chop(1, 2) == [[false], [true, false]]

      Parameters:
        `self` - a boolean Array to be chopped
        `chopSizes` - the sizes for the returned pieces
      Returns:
        a list of lists chopping the original array elements into pieces determined by chopSizes
      See Also:
        to chop a list into pieces of a fixed size
      Since:
        5.0.0

    - #### public static List<List<Byte>> chop(byte[] self, int chopSizes)

      Chops the byte array into pieces, returning lists with sizes corresponding to the supplied chop sizes. If the array isn't large enough, truncated (possibly empty) pieces are returned. Using a chop size of -1 will cause that piece to contain all remaining items from the array.

           byte[] array = [0, 1, 2]
           assert array.chop(1, 2) == [[0], [1, 2]]

      Parameters:
        `self` - a byte Array to be chopped
        `chopSizes` - the sizes for the returned pieces
      Returns:
        a list of lists chopping the original array elements into pieces determined by chopSizes
      See Also:
        to chop a list into pieces of a fixed size
      Since:
        5.0.0

    - #### public static List<List<Character>> chop(char[] self, int chopSizes)

      Chops the char array into pieces, returning lists with sizes corresponding to the supplied chop sizes. If the array isn't large enough, truncated (possibly empty) pieces are returned. Using a chop size of -1 will cause that piece to contain all remaining items from the array.

           char[] array = [0, 1, 2]
           assert array.chop(1, 2) == [[0], [1, 2]]

      Parameters:
        `self` - a char Array to be chopped
        `chopSizes` - the sizes for the returned pieces
      Returns:
        a list of lists chopping the original array elements into pieces determined by chopSizes
      See Also:
        to chop a list into pieces of a fixed size
      Since:
        5.0.0

    - #### public static List<List<Short>> chop(short[] self, int chopSizes)

      Chops the short array into pieces, returning lists with sizes corresponding to the supplied chop sizes. If the array isn't large enough, truncated (possibly empty) pieces are returned. Using a chop size of -1 will cause that piece to contain all remaining items from the array.

           short[] array = [0, 1, 2]
           assert array.chop(1, 2) == [[0], [1, 2]]

      Parameters:
        `self` - a short Array to be chopped
        `chopSizes` - the sizes for the returned pieces
      Returns:
        a list of lists chopping the original array elements into pieces determined by chopSizes
      See Also:
        to chop a list into pieces of a fixed size
      Since:
        5.0.0

    - #### public static List<List<Integer>> chop(int[] self, int chopSizes)

      Chops the int array into pieces, returning lists with sizes corresponding to the supplied chop sizes. If the array isn't large enough, truncated (possibly empty) pieces are returned. Using a chop size of -1 will cause that piece to contain all remaining items from the array.

           int[] array = [0, 1, 2]
           assert array.chop(1, 2) == [[0], [1, 2]]

      Parameters:
        `self` - an int Array to be chopped
        `chopSizes` - the sizes for the returned pieces
      Returns:
        a list of lists chopping the original array elements into pieces determined by chopSizes
      See Also:
        to chop a list into pieces of a fixed size
      Since:
        5.0.0

    - #### public static List<List<Long>> chop(long[] self, int chopSizes)

      Chops the long array into pieces, returning lists with sizes corresponding to the supplied chop sizes. If the array isn't large enough, truncated (possibly empty) pieces are returned. Using a chop size of -1 will cause that piece to contain all remaining items from the array.

           long[] array = [0, 1, 2]
           assert array.chop(1, 2) == [[0], [1, 2]]

      Parameters:
        `self` - a long Array to be chopped
        `chopSizes` - the sizes for the returned pieces
      Returns:
        a list of lists chopping the original array elements into pieces determined by chopSizes
      See Also:
        to chop a list into pieces of a fixed size
      Since:
        5.0.0

    - #### public static List<List<Float>> chop(float[] self, int chopSizes)

      Chops the float array into pieces, returning lists with sizes corresponding to the supplied chop sizes. If the array isn't large enough, truncated (possibly empty) pieces are returned. Using a chop size of -1 will cause that piece to contain all remaining items from the array.

           float[] array = [0, 1, 2]
           assert array.chop(1, 2) == [[0], [1, 2]]

      Parameters:
        `self` - a float Array to be chopped
        `chopSizes` - the sizes for the returned pieces
      Returns:
        a list of lists chopping the original array elements into pieces determined by chopSizes
      See Also:
        to chop a list into pieces of a fixed size
      Since:
        5.0.0

    - #### public static List<List<Double>> chop(double[] self, int chopSizes)

      Chops the double array into pieces, returning lists with sizes corresponding to the supplied chop sizes. If the array isn't large enough, truncated (possibly empty) pieces are returned. Using a chop size of -1 will cause that piece to contain all remaining items from the array.

           double[] array = [0, 1, 2]
           assert array.chop(1, 2) == [[0], [1, 2]]

      Parameters:
        `self` - a double Array to be chopped
        `chopSizes` - the sizes for the returned pieces
      Returns:
        a list of lists chopping the original array elements into pieces determined by chopSizes
      See Also:
        to chop a list into pieces of a fixed size
      Since:
        5.0.0

    - #### <T> public static List<List<T>> chop(T[] self, int chopSizes)

      Chops the array into pieces, returning lists with sizes corresponding to the supplied chop sizes. If the array isn't large enough, truncated (possibly empty) pieces are returned. Using a chop size of -1 will cause that piece to contain all remaining items from the array.

      Parameters:
        `self` - an Array to be chopped
        `chopSizes` - the sizes for the returned pieces
      Returns:
        a list of lists chopping the original array elements into pieces determined by chopSizes
      See Also:
        to chop a list into pieces of a fixed size
      Since:
        2.5.2

    - #### <T> public static List<List<T>> collate(T[] self, int size)

      Collates an array.

      Parameters:
        `self` - an array
        `size` - the length of each sub-list in the returned list
      Returns:
        a List containing the array values collated into sub-lists
      See Also:
        DefaultGroovyMethods.collate
      Since:
        2.5.0

    - #### <T> public static List<List<T>> collate(T[] self, int size, int step)

      Collates an array into sub-lists.

      Parameters:
        `self` - an array
        `size` - the length of each sub-list in the returned list
        `step` - the number of elements to step through for each sub-list
      Returns:
        a List containing the array elements collated into sub-lists
      See Also:
        DefaultGroovyMethods.collate
      Since:
        2.5.0

    - #### <T> public static List<List<T>> collate(T[] self, int size, boolean keepRemainder)

      Collates this array into sub-lists.

      Parameters:
        `self` - an array
        `size` - the length of each sub-list in the returned list
        `keepRemainder` - if true, any remaining elements are returned as sub-lists; otherwise, they are discarded
      Returns:
        a List containing the array elements collated into sub-lists
      See Also:
        DefaultGroovyMethods.collate
      Since:
        2.5.0

    - #### <T> public static List<List<T>> collate(T[] self, int size, int step, boolean keepRemainder)

      Collates this array into sub-lists.

      Parameters:
        `self` - an array
        `size` - the length of each sub-list in the returned list
        `step` - the number of elements to step through for each sub-list
        `keepRemainder` - if true, any remaining elements are returned as sub-lists; otherwise, they are discarded
      Returns:
        a List containing the array elements collated into sub-lists
      Since:
        2.5.0

    - #### <E, T> public static List<T> collect(E[] self, @ClosureParams(FirstParam.Component.class)
      Closure<T> transform)

      Iterates through this Array transforming each item into a new value using the `transform` closure, returning a list of transformed values.

      Parameters:
        `self` - an array
        `transform` - the closure used to transform each item of the Array
      Returns:
        A list of the transformed values.
      Since:
        2.5.0

    - #### <E, T, C extends Collection<T>> public static C collect(E[] self, C collector, @ClosureParams(FirstParam.Component.class)
      Closure<? extends T> transform)

      Iterates through this Array transforming each item into a new value using the `transform` closure and adding it to the supplied `collector`.

           Integer[] nums = [1,2,3]
           List answer = []
           nums.collect(answer) { it * 2 }
           assert answer == [2,4,6]

      Parameters:
        `self` - an array
        `collector` - the Collection to which the transformed values are added
        `transform` - the closure used to transform each item
      Returns:
        The collector with all transformed values added to it.
      Since:
        2.5.0

    - #### <K, V, E> public static Map<K, V> collectEntries(E[] self)

      A variant of collectEntries using the identity closure as the transform.

      Parameters:
        `self` - an array
      Returns:
        the collector with all transformed values added to it
      See Also:
        collectEntries(Object[], Closure)
      Since:
        1.8.5

    - #### <K, V, E> public static Map<K, V> collectEntries(E[] self, Map<K, V> collector)

      A variant of collectEntries using the identity closure as the transform.

      Parameters:
        `self` - an array
        `collector` - the Map into which the transformed entries are put
      Returns:
        the collector with all transformed values added to it
      See Also:
        collectEntries(Object[], Map, Closure)
      Since:
        1.8.5

    - #### <K, V, E> public static Map<K, V> collectEntries(E[] self, @ClosureParams(FirstParam.Component.class)
      Closure<?> transform)

      Iterates through this array transforming each item using the `transform` closure and returning a map of the resulting transformed entries.

           def letters = "abc"
           def nums = [0, 1, 2] as Integer[]
           // collect letters with index using list style
           assert nums.collectEntries { index -> [index, letters[index]] } == [0:'a', 1:'b', 2:'c']
           // collect letters with index using map style
           assert nums.collectEntries { index -> [(index): letters[index]] } == [0:'a', 1:'b', 2:'c']

      Note: When using the list-style of result, the behavior is '`def (key, value) = listResultFromClosure`'. While we strongly discourage using a list of size other than 2, Groovy's normal semantics apply in this case; throwing away elements after the second one and using null for the key or value for the case of a shortened list.
      Parameters:
        `self` - a Collection
        `transform` - the closure used for transforming, which has an item from self as the parameter and should return a Map.Entry, a Map or a two-element list containing the resulting key and value
      Returns:
        a Map of the transformed entries
      See Also:
        DefaultGroovyMethods.collectEntries
      Since:
        1.7.9

    - #### <K, V, E> public static Map<K, V> collectEntries(E[] self, Map<K, V> collector, @ClosureParams(FirstParam.Component.class)
      Closure<?> transform)

      Iterates through this array transforming each item using the `transform` closure and returning a map of the resulting transformed entries.

           def letters = "abc"
           def nums = [0, 1, 2] as Integer[]
           // collect letters with index
           assert nums.collectEntries( [:] ) { index -> [index, letters[index]] } == [0:'a', 1:'b', 2:'c']
           assert nums.collectEntries( [4:'d'] ) { index -> [(index+1): letters[index]] } == [1:'a', 2:'b', 3:'c', 4:'d']

      Note: When using the list-style of result, the behavior is '`def (key, value) = listResultFromClosure`'. While we strongly discourage using a list of size other than 2, Groovy's normal semantics apply in this case; throwing away elements after the second one and using null for the key or value for the case of a shortened list. If your collector Map doesn't support null keys or values, you might get a runtime error, e.g. NullPointerException or IllegalArgumentException.
      Parameters:
        `self` - an array
        `collector` - the Map into which the transformed entries are put
        `transform` - the closure used for transforming, which has an item from self as the parameter and should return a Map.Entry, a Map or a two-element list containing the resulting key and value
      Returns:
        the collector with all transformed values added to it
      See Also:
        DefaultGroovyMethods.collect
      Since:
        1.7.9

    - #### <K, V, E> public static Map<K, V> collectEntries(E[] self, Function<? super E, K> keyTransform, Function<? super E, V> valueTransform)

      A variant of collectEntries for arrays with separate functions for transforming the keys and values.

           String[] languages = ['Groovy', 'Java', 'Kotlin', 'Scala']
           def firstLetter = (s) -> s[0]
           assert languages.collectEntries(firstLetter, String::size) == [G:6, J:4, K:6, S:5]

      Parameters:
        `self` - an array
        `keyTransform` - a function for transforming array elements into keys
        `valueTransform` - a function for transforming array elements into values
      Returns:
        a Map of the transformed entries
      Since:
        5.0.0

    - #### <K, V, E> public static Map<K, V> collectEntries(E[] self, Map<K, V> collector, Function<? super E, K> keyTransform, Function<? super E, V> valueTransform)

      A variant of collectEntries for arrays with separate functions for transforming the keys and values. The supplied collector map is used as the destination for transformed entries.

      Parameters:
        `self` - an array
        `collector` - the Map into which the transformed entries are put
        `keyTransform` - a function for transforming array elements into keys
        `valueTransform` - a function for transforming array elements into values
      Returns:
        the collector with all transformed values added to it
      Since:
        5.0.0

    - #### <T, E> public static List<T> collectMany(E[] self, @ClosureParams(FirstParam.Component.class)
      Closure<? extends Collection<? extends T>> projection)

      Projects each item from a source array to a collection and concatenates (flattens) the resulting collections into a single list.

           def nums = [1, 2, 3, 4, 5, 6] as Object[]
           def squaresAndCubesOfEvens = nums.collectMany{ it % 2 ? [] : [it**2, it**3] }
           assert squaresAndCubesOfEvens == [4, 8, 16, 64, 36, 216]

      Parameters:
        `self` - an array
        `projection` - a projecting Closure returning a collection of items
      Returns:
        A list created from the projected collections concatenated (flattened) together.
      Since:
        1.8.1

    - #### <T, E, C extends Collection<T>> public static C collectMany(E[] self, C collector, @ClosureParams(FirstParam.Component.class)
      Closure<? extends Collection<? extends T>> projection)

      Projects each item from a source array to a collection and concatenates (flattens) the resulting collections into a single list.

           def nums = [1, 2, 3, 4, 5, 6] as Object[]
           def squaresAndCubesOfEvens = nums.collectMany{ it % 2 ? [] : [it**2, it**3] }
           assert squaresAndCubesOfEvens == [4, 8, 16, 64, 36, 216]

      Parameters:
        `self` - an array
        `collector` - an initial collection to add the projected items to
        `projection` - a projecting Closure returning a collection of items
      Returns:
        The collector with the projected collections concatenated (flattened) to it.
      Since:
        1.8.1

    - #### public static double[] column(double self, int col)

      Select a column from a 2D array.

           double[][] nums = [[1.0d, 2.0d], [10.0d, 20.0d]]
           assert nums.column(0) == [1.0d, 10.0d] as double[]
           assert nums.column(1) == [2.0d, 20.0d] as double[]

      Parameters:
        `self` - a double[][]
      Returns:
        a double[]
      Since:
        5.0.0

    - #### public static float[] column(float self, int col)

      Select a column from a 2D array.

           float[][] nums = [[1.0f, 2.0f], [10.0f, 20.0f]]
           assert nums.column(0) == [1.0f, 10.0f] as float[]
           assert nums.column(1) == [2.0f, 20.0f] as float[]

      Parameters:
        `self` - a float[][]
      Returns:
        a float[]
      Since:
        5.0.0

    - #### public static int[] column(int self, int col)

      Select a column from a 2D array.

           int[][] nums = [[1, 2], [10, 20]]
           assert nums.column(0) == [1, 10] as int[]
           assert nums.column(1) == [2, 20] as int[]

      Parameters:
        `self` - an int[][]
      Returns:
        an int[]
      Since:
        5.0.0

    - #### public static long[] column(long self, int col)

      Select a column from a 2D array.

           long[][] nums = [[1L, 2L], [10L, 20L]]
           assert nums.column(0) == [1L, 10L] as long[]
           assert nums.column(1) == [2L, 20L] as long[]

      Parameters:
        `self` - a long[][]
      Returns:
        a long[]
      Since:
        5.0.0

    - #### @Deprecated
      public static Iterator<double[]> columns(double self)

    - #### @Deprecated
      public static Iterator<float[]> columns(float self)

    - #### @Deprecated
      public static Iterator<int[]> columns(int self)

    - #### @Deprecated
      public static Iterator<long[]> columns(long self)

    - #### public static boolean contains(boolean[] self, Object value)

      Checks whether the array contains the given value.

      Parameters:
        `self` - the array we are searching
        `value` - the value being searched for
      Returns:
        true if the array contains the value
      Since:
        1.8.6

    - #### public static boolean contains(byte[] self, Object value)

      Checks whether the array contains the given value.

      Parameters:
        `self` - the array we are searching
        `value` - the value being searched for
      Returns:
        true if the array contains the value
      Since:
        1.8.6

    - #### public static boolean contains(char[] self, Object value)

      Checks whether the array contains the given value.

      Parameters:
        `self` - the array we are searching
        `value` - the value being searched for
      Returns:
        true if the array contains the value
      Since:
        1.8.6

    - #### public static boolean contains(short[] self, Object value)

      Checks whether the array contains the given value.

      Parameters:
        `self` - the array we are searching
        `value` - the value being searched for
      Returns:
        true if the array contains the value
      Since:
        1.8.6

    - #### public static boolean contains(int[] self, Object value)

      Checks whether the array contains the given value.

      Parameters:
        `self` - the array we are searching
        `value` - the value being searched for
      Returns:
        true if the array contains the value
      Since:
        1.8.6

    - #### public static boolean contains(long[] self, Object value)

      Checks whether the array contains the given value.

      Parameters:
        `self` - the array we are searching
        `value` - the value being searched for
      Returns:
        true if the array contains the value
      Since:
        1.8.6

    - #### public static boolean contains(float[] self, Object value)

      Checks whether the array contains the given value.

      Parameters:
        `self` - the array we are searching
        `value` - the value being searched for
      Returns:
        true if the array contains the value
      Since:
        1.8.6

    - #### public static boolean contains(double[] self, Object value)

      Checks whether the array contains the given value.

      Parameters:
        `self` - the array we are searching
        `value` - the value being searched for
      Returns:
        true if the array contains the value
      Since:
        1.8.6

    - #### public static boolean contains(Object[] self, Object value)

      Checks whether the array contains the given value.

      Parameters:
        `self` - the array we are searching
        `value` - the value being searched for
      Returns:
        true if the array contains the value
      Since:
        1.8.6

    - #### public static Number count(boolean[] self, Object value)

      Counts the number of occurrences of the given value inside this array. Comparison is done using Groovy's == operator (using `compareTo(value) == 0`).

           boolean[] array = [false, true, true]
           assert array.count(true) == 2

      Parameters:
        `self` - the array within which we count the number of occurrences
        `value` - the value being searched for
      Returns:
        the number of occurrences
      See Also:
        DefaultGroovyMethods.count
      Since:
        1.6.4

    - #### public static Number count(byte[] self, Object value)

      Counts the number of occurrences of the given value inside this array. Comparison is done using Groovy's == operator (using `compareTo(value) == 0`).

           byte[] array = [10, 20, 20, 30]
           assert array.count(20) == 2

      Parameters:
        `self` - the array within which we count the number of occurrences
        `value` - the value being searched for
      Returns:
        the number of occurrences
      See Also:
        DefaultGroovyMethods.count
      Since:
        1.6.4

    - #### public static Number count(char[] self, Object value)

      Counts the number of occurrences of the given value inside this array. Comparison is done using Groovy's == operator (using `compareTo(value) == 0`).

           char[] array = ['x', 'y', 'z', 'z', 'y']
           assert array.count('y') == 2

      Parameters:
        `self` - the array within which we count the number of occurrences
        `value` - the value being searched for
      Returns:
        the number of occurrences
      See Also:
        DefaultGroovyMethods.count
      Since:
        1.6.4

    - #### public static Number count(short[] self, Object value)

      Counts the number of occurrences of the given value inside this array. Comparison is done using Groovy's == operator (using `compareTo(value) == 0`).

           short[] array = [10, 20, 20, 30]
           assert array.count(20) == 2

      Parameters:
        `self` - the array within which we count the number of occurrences
        `value` - the value being searched for
      Returns:
        the number of occurrences
      See Also:
        DefaultGroovyMethods.count
      Since:
        1.6.4

    - #### public static Number count(int[] self, Object value)

      Counts the number of occurrences of the given value inside this array. Comparison is done using Groovy's == operator (using `compareTo(value) == 0`).

           int[] array = [10, 20, 20, 30]
           assert array.count(20) == 2

      Parameters:
        `self` - the array within which we count the number of occurrences
        `value` - the value being searched for
      Returns:
        the number of occurrences
      See Also:
        DefaultGroovyMethods.count
      Since:
        1.6.4

    - #### public static Number count(long[] self, Object value)

      Counts the number of occurrences of the given value inside this array. Comparison is done using Groovy's == operator (using `compareTo(value) == 0`).

           long[] array = [10L, 20L, 20L, 30L]
           assert array.count(20L) == 2

      Parameters:
        `self` - the array within which we count the number of occurrences
        `value` - the value being searched for
      Returns:
        the number of occurrences
      See Also:
        DefaultGroovyMethods.count
      Since:
        1.6.4

    - #### public static Number count(float[] self, Object value)

      Counts the number of occurrences of the given value inside this array. Comparison is done using Groovy's == operator (using `compareTo(value) == 0`).

           float[] array = [10.0f, 20.0f, 20.0f, 30.0f]
           assert array.count(20.0f) == 2

      Parameters:
        `self` - the array within which we count the number of occurrences
        `value` - the value being searched for
      Returns:
        the number of occurrences
      See Also:
        DefaultGroovyMethods.count
      Since:
        1.6.4

    - #### public static Number count(double[] self, Object value)

      Counts the number of occurrences of the given value inside this array. Comparison is done using Groovy's == operator (using `compareTo(value) == 0`).

           double[] array = [10.0d, 20.0d, 20.0d, 30.0d]
           assert array.count(20.0d) == 2

      Parameters:
        `self` - the array within which we count the number of occurrences
        `value` - the value being searched for
      Returns:
        the number of occurrences
      See Also:
        DefaultGroovyMethods.count
      Since:
        1.6.4

    - #### public static Number count(Object[] self, Object value)

      Counts the number of occurrences of the given value inside this array. Comparison is done using Groovy's == operator (using `compareTo(value) == 0` or `equals(value)` ).

      Parameters:
        `self` - the array within which we count the number of occurrences
        `value` - the value being searched for
      Returns:
        the number of occurrences
      Since:
        1.6.4

    - #### <T> public static Number count(T[] self, @ClosureParams(FirstParam.Component.class)
      Closure<?> predicate)

      Counts the number of occurrences which satisfy the given closure from inside this array.

      Parameters:
        `self` - the array within which we count the number of occurrences
        `predicate` - a closure condition
      Returns:
        the number of occurrences
      Since:
        1.8.0

    - #### <K, E> public static Map<K, Integer> countBy(E[] self, @ClosureParams(FirstParam.Component.class)
      Closure<K> closure)

      Sorts all array members into groups determined by the supplied mapping closure and counts the group size. The closure should return the key that each item should be grouped by. The returned Map will have an entry for each distinct key returned from the closure, with each value being the frequency of items occurring for that group.

      Example usage:

          assert ([1,2,2,2,3] as Object[]).countBy{ it % 2 } == [1:2, 0:3]

      Parameters:
        `self` - an array to group and count
        `closure` - a closure mapping items to the frequency keys
      Returns:
        a new Map grouped by keys with frequency counts
      See Also:
        DefaultGroovyMethods.countBy
      Since:
        1.8.0

    - #### <E> public static Map<E, Integer> countBy(E[] self)

      Creates a multiset-like map of the array members.

      Example usage:

           assert [1:2, 2:2, 3:1] == ([1,2,1,2,3] as Object[]).countBy()

      Parameters:
        `self` - an array to group and count
      Returns:
        a new Map where the keys are the set of values in the array and the values are the frequency counts
      Since:
        5.0.0

    - #### <T> public static T[] drop(T[] self, int num)

      Drops the given number of elements from the head of this array if they are available.

           String[] strings = [ 'a', 'b', 'c' ]
           assert strings.drop( 0 ) == [ 'a', 'b', 'c' ] as String[]
           assert strings.drop( 2 ) == [ 'c' ] as String[]
           assert strings.drop( 5 ) == [] as String[]

      Parameters:
        `self` - the original array
        `num` - the number of elements to drop from this array
      Returns:
        An array consisting of all elements of this array except the first `num` ones, or else the empty array, if this array has less than `num` elements.
      Since:
        1.8.1

    - #### <T> public static T[] dropRight(T[] self, int num)

      Drops the given number of elements from the tail of this array if they are available.

           String[] strings = [ 'a', 'b', 'c' ]
           assert strings.dropRight( 0 ) == [ 'a', 'b', 'c' ] as String[]
           assert strings.dropRight( 2 ) == [ 'a' ] as String[]
           assert strings.dropRight( 5 ) == [] as String[]

      Parameters:
        `self` - the original array
        `num` - the number of elements to drop from this array
      Returns:
        An array consisting of all elements of this array except the last `num` ones, or else the empty array, if this array has less than `num` elements.
      Since:
        2.4.0

    - #### <T> public static T[] dropWhile(T[] self, @ClosureParams(FirstParam.Component.class)
      Closure<?> condition)

      Create a suffix of the given array by dropping as many elements as possible from the front of the original array such that calling the given closure condition evaluates to true when passed each of the dropped elements.

           def nums = [ 1, 3, 2 ] as Integer[]
           assert nums.dropWhile{ it <= 3 } == [ ] as Integer[]
           assert nums.dropWhile{ it < 3 } == [ 3, 2 ] as Integer[]
           assert nums.dropWhile{ it != 2 } == [ 2 ] as Integer[]
           assert nums.dropWhile{ it == 0 } == [ 1, 3, 2 ] as Integer[]

      Parameters:
        `self` - the original array
        `condition` - the closure that must evaluate to true to continue dropping elements
      Returns:
        The shortest suffix of the given array such that the given closure condition evaluates to true for each element dropped from the front of the array.
      Since:
        1.8.7

    - #### @Incubating
      public static boolean[] each(boolean[] self, Consumer<Boolean> consumer)

      Iterates through a boolean[] passing each boolean to the given consumer.

           boolean[] array = [false, true, false]
           String result = ''
           array.each{ result += it.toString()[0] }
           assert result == 'ftf'

      Parameters:
        `self` - the boolean array over which we iterate
        `consumer` - the consumer for each boolean
      Returns:
        the self array
      Since:
        5.0.0

    - #### @Incubating
      public static byte[] each(byte[] self, Consumer<Byte> consumer)

      Iterates through a byte[] passing each byte to the given consumer.

           byte[] array = [0, 1, 2]
           String result = ''
           array.each{ result += it }
           assert result == '012'

      Parameters:
        `self` - the byte array over which we iterate
        `consumer` - the consumer for each byte
      Returns:
        the self array
      Since:
        5.0.0

    - #### @Incubating
      public static char[] each(char[] self, Consumer<Character> consumer)

      Iterates through a char[] passing each char to the given consumer.

           char[] array = ['a' as char, 'b' as char, 'c' as char]
           String result = ''
           array.each{ result += it }
           assert result == 'abc'

      Parameters:
        `self` - the char array over which we iterate
        `consumer` - the consumer for each char
      Returns:
        the self array
      Since:
        5.0.0

    - #### @Incubating
      public static short[] each(short[] self, Consumer<Short> consumer)

      Iterates through a short[] passing each short to the given consumer.

           short[] array = [0, 1, 2]
           String result = ''
           array.each{ result += it }
           assert result == '012'

      Parameters:
        `self` - the short array over which we iterate
        `consumer` - the consumer for each short
      Returns:
        the self array
      Since:
        5.0.0

    - #### @Incubating
      public static int[] each(int[] self, IntConsumer consumer)

      Iterates through an int[] passing each int to the given consumer.

           int[] array = [0, 1, 2]
           String result = ''
           array.each{ result += it }
           assert result == '012'

      Parameters:
        `self` - the int array over which we iterate
        `consumer` - the consumer for each int
      Returns:
        the self array
      Since:
        5.0.0

    - #### @Incubating
      public static long[] each(long[] self, LongConsumer consumer)

      Iterates through a long[] passing each long to the given consumer.

           long[] array = [0L, 1L, 2L]
           String result = ''
           array.each{ result += it }
           assert result == '012'

      Parameters:
        `self` - the long array over which we iterate
        `consumer` - the consumer for each long
      Returns:
        the self array
      Since:
        5.0.0

    - #### @Incubating
      public static float[] each(float[] self, Consumer<Float> consumer)

      Iterates through a float[] passing each float to the given consumer.

           float[] array = [0f, 1f, 2f]
           String result = ''
           array.each{ result += it }
           assert result == '0.01.02.0'

      Parameters:
        `self` - the float array over which we iterate
        `consumer` - the consumer for each float
      Returns:
        the self array
      Since:
        5.0.0

    - #### @Incubating
      public static double[] each(double[] self, DoubleConsumer consumer)

      Iterates through a double[] passing each double to the given consumer.

           double[] array = [0d, 1d, 2d]
           String result = ''
           array.each{ result += it }
           assert result == '0.01.02.0'

      Parameters:
        `self` - the double array over which we iterate
        `consumer` - the consumer for each double
      Returns:
        the self array
      Since:
        5.0.0

    - #### <T> public static T[] each(T[] self, @ClosureParams(FirstParam.Component.class)
      Closure<?> closure)

      Iterates through an array passing each array entry to the given closure.

           String[] letters = ['a', 'b', 'c']
           String result = ''
           letters.each{ result += it }
           assert result == 'abc'

      Parameters:
        `self` - the array over which we iterate
        `closure` - the closure applied on each array entry
      Returns:
        the self array
      Since:
        2.5.0

    - #### public static void eachByte(byte[] self, @ClosureParams(FirstParam.Component.class)
      Closure<?> closure)

      Traverses through each byte of this byte array.

      Parameters:
        `self` - a byte array
        `closure` - a closure
      Since:
        1.5.5

    - #### public static void eachByte(Byte[] self, @ClosureParams(FirstParam.Component.class)
      Closure<?> closure)

      Traverses through each byte of this Byte array. Alias for each.

      Parameters:
        `self` - a Byte array
        `closure` - a closure
      Since:
        1.5.5

    - #### public static double eachColumn(double self, @ClosureParams(FirstParam.Component.class)
      Closure<?> closure)

      Process the columns of the array.

           double[][] nums = [[1.0d, 2.0d], [10.0d, 20.0d]]
           nums.eachColumn {
               assert it[0] * 10.0d == it[1]
           }

      Parameters:
        `self` - a double[][]
        `closure` - the closure applied on each array column
      Returns:
        the self array
      Since:
        5.0.0

    - #### public static float eachColumn(float self, @ClosureParams(FirstParam.Component.class)
      Closure<?> closure)

      Process the columns of the array.

           double[][] nums = [[1.0f, 2.0f], [10.0f, 20.0f]]
           nums.eachColumn {
               assert it[0] * 10.0f == it[1]
           }

      Parameters:
        `self` - a float[][]
        `closure` - the closure applied on each array column
      Returns:
        the self array
      Since:
        5.0.0

    - #### public static int eachColumn(int self, @ClosureParams(FirstParam.Component.class)
      Closure<?> closure)

      Process the columns of the array.

           double[][] nums = [[1, 2], [10, 20]]
           nums.eachColumn {
               assert it[0] * 10 == it[1]
           }

      Parameters:
        `self` - an int[][]
        `closure` - the closure applied on each array column
      Returns:
        the self array
      Since:
        5.0.0

    - #### public static long eachColumn(long self, @ClosureParams(FirstParam.Component.class)
      Closure<?> closure)

      Process the columns of the array.

           double[][] nums = [[1L, 2L], [10L, 20L]]
           nums.eachColumn {
               assert it[0] * 10L == it[1]
           }

      Parameters:
        `self` - a long[][]
        `closure` - the closure applied on each array column
      Returns:
        the self array
      Since:
        5.0.0

    - #### public static boolean[] eachWithIndex(boolean[] self, @ClosureParams(value=FromString.class,options="Boolean,Integer")
      Closure<?> closure)

      Iterates through a boolean[], passing each boolean and the element's index (a counter starting at zero) to the given closure.

           boolean[] array = [false, true, false]
           String result = ''
           array.eachWithIndex{ item, index -> result += "$index($item)" }
           assert result == '0(false)1(true)2(false)'

      Parameters:
        `self` - a boolean array
        `closure` - a Closure to operate on each boolean
      Returns:
        the self array
      Since:
        5.0.0

    - #### public static byte[] eachWithIndex(byte[] self, @ClosureParams(value=FromString.class,options="Byte,Integer")
      Closure<?> closure)

      Iterates through a byte[], passing each byte and the element's index (a counter starting at zero) to the given closure.

           byte[] array = [10, 20, 30]
           String result = ''
           array.eachWithIndex{ item, index -> result += "$index($item)" }
           assert result == '0(10)1(20)2(30)'

      Parameters:
        `self` - a byte array
        `closure` - a Closure to operate on each byte
      Returns:
        the self array
      Since:
        5.0.0

    - #### public static char[] eachWithIndex(char[] self, @ClosureParams(value=FromString.class,options="Character,Integer")
      Closure<?> closure)

      Iterates through a char[], passing each char and the element's index (a counter starting at zero) to the given closure.

           char[] array = ['a' as char, 'b' as char, 'c' as char]
           String result = ''
           array.eachWithIndex{ item, index -> result += "$index($item)" }
           assert result == '0(a)1(b)2(c)'

      Parameters:
        `self` - a char array
        `closure` - a Closure to operate on each char
      Returns:
        the self array
      Since:
        5.0.0

    - #### public static short[] eachWithIndex(short[] self, @ClosureParams(value=FromString.class,options="Short,Integer")
      Closure<?> closure)

      Iterates through a short[], passing each short and the element's index (a counter starting at zero) to the given closure.

           short[] array = [10, 20, 30]
           String result = ''
           array.eachWithIndex{ item, index -> result += "$index($item)" }
           assert result == '0(10)1(20)2(30)'

      Parameters:
        `self` - a short array
        `closure` - a Closure to operate on each short
      Returns:
        the self array
      Since:
        5.0.0

    - #### public static int[] eachWithIndex(int[] self, @ClosureParams(value=FromString.class,options="Integer,Integer")
      Closure<?> closure)

      Iterates through an int[], passing each int and the element's index (a counter starting at zero) to the given closure.

           int[] array = [10, 20, 30]
           String result = ''
           array.eachWithIndex{ item, index -> result += "$index($item)" }
           assert result == '0(10)1(20)2(30)'

      Parameters:
        `self` - an int array
        `closure` - a Closure to operate on each int
      Returns:
        the self array
      Since:
        5.0.0

    - #### public static long[] eachWithIndex(long[] self, @ClosureParams(value=FromString.class,options="Long,Integer")
      Closure<?> closure)

      Iterates through a long[], passing each long and the element's index (a counter starting at zero) to the given closure.

           long[] array = [10L, 20L, 30L]
           String result = ''
           array.eachWithIndex{ item, index -> result += "$index($item)" }
           assert result == '0(10)1(20)2(30)'

      Parameters:
        `self` - a long array
        `closure` - a Closure to operate on each long
      Returns:
        the self array
      Since:
        5.0.0

    - #### public static float[] eachWithIndex(float[] self, @ClosureParams(value=FromString.class,options="Float,Integer")
      Closure<?> closure)

      Iterates through a float[], passing each float and the element's index (a counter starting at zero) to the given closure.

           float[] array = [10f, 20f, 30f]
           String result = ''
           array.eachWithIndex{ item, index -> result += "$index($item)" }
           assert result == '0(10.0)1(20.0)2(30.0)'

      Parameters:
        `self` - a float array
        `closure` - a Closure to operate on each float
      Returns:
        the self array
      Since:
        5.0.0

    - #### public static double[] eachWithIndex(double[] self, @ClosureParams(value=FromString.class,options="Double,Integer")
      Closure<?> closure)

      Iterates through a double[], passing each double and the element's index (a counter starting at zero) to the given closure.

           double[] array = [10d, 20d, 30d]
           String result = ''
           array.eachWithIndex{ item, index -> result += "$index($item)" }
           assert result == '0(10.0)1(20.0)2(30.0)'

      Parameters:
        `self` - a double array
        `closure` - a Closure to operate on each double
      Returns:
        the self array
      Since:
        5.0.0

    - #### <T> public static T[] eachWithIndex(T[] self, @ClosureParams(value=FromString.class,options="T,Integer")
      Closure<?> closure)

      Iterates through an array, passing each array element and the element's index (a counter starting at zero) to the given closure.

           String[] letters = ['a', 'b', 'c']
           String result = ''
           letters.eachWithIndex{ letter, index -> result += "$index:$letter" }
           assert result == '0:a1:b2:c'

      Parameters:
        `self` - an array
        `closure` - a Closure to operate on each array entry
      Returns:
        the self array
      Since:
        2.5.0

    - #### public static boolean equals(boolean[] self, boolean[] right)

      Compares the contents of this array to the contents of the given array.

      Example usage:

           boolean[] array1 = [true, false]
           boolean[] array2 = [true, false]
           assert array1 !== array2
           assert array1.equals(array2)

      Parameters:
        `self` - a boolean array
        `right` - the array being compared
      Returns:
        true if the contents of both arrays are equal.
      Since:
        5.0.0

    - #### public static boolean equals(byte[] self, byte[] right)

      Compares the contents of this array to the contents of the given array.

      Example usage:

           byte[] array1 = [4, 8]
           byte[] array2 = [4, 8]
           assert array1 !== array2
           assert array1.equals(array2)

      Parameters:
        `self` - a byte array
        `right` - the array being compared
      Returns:
        true if the contents of both arrays are equal.
      Since:
        5.0.0

    - #### public static boolean equals(char[] self, char[] right)

      Compares the contents of this array to the contents of the given array.

      Example usage:

           char[] array1 = ['a', 'b']
           char[] array2 = ['a', 'b']
           assert array1 !== array2
           assert array1.equals(array2)

      Parameters:
        `self` - a char array
        `right` - the array being compared
      Returns:
        true if the contents of both arrays are equal.
      Since:
        5.0.0

    - #### public static boolean equals(short[] self, short[] right)

      Compares the contents of this array to the contents of the given array.

      Example usage:

           short[] array1 = [4, 8]
           short[] array2 = [4, 8]
           assert array1 !== array2
           assert array1.equals(array2)

      Parameters:
        `self` - a short array
        `right` - the array being compared
      Returns:
        true if the contents of both arrays are equal.
      Since:
        5.0.0

    - #### public static boolean equals(int[] self, int[] right)

      Compares the contents of this array to the contents of the given array.

      Example usage:

           int[] array1 = [4, 8]
           int[] array2 = [4, 8]
           assert array1 !== array2
           assert array1.equals(array2)

      Parameters:
        `self` - an int array
        `right` - the array being compared
      Returns:
        true if the contents of both arrays are equal.
      Since:
        5.0.0

    - #### public static boolean equals(long[] self, long[] right)

      Compares the contents of this array to the contents of the given array.

      Example usage:

           long[] array1 = [4L, 8L]
           long[] array2 = [4L, 8L]
           assert array1 !== array2
           assert array1.equals(array2)

      Parameters:
        `self` - a long array
        `right` - the array being compared
      Returns:
        true if the contents of both arrays are equal.
      Since:
        5.0.0

    - #### public static boolean equals(float[] self, float[] right)

      Compares the contents of this array to the contents of the given array.

      Example usage:

           float[] array1 = [4.0f, 8.0f]
           float[] array2 = [4.0f, 8.0f]
           assert array1 !== array2
           assert array1.equals(array2)

      Parameters:
        `self` - a float array
        `right` - the array being compared
      Returns:
        true if the contents of both arrays are equal.
      Since:
        5.0.0

    - #### public static boolean equals(double[] self, double[] right)

      Compares the contents of this array to the contents of the given array.

      Example usage:

           double[] array1 = [4.0d, 8.0d]
           double[] array2 = [4.0d, 8.0d]
           assert array1 !== array2
           assert array1.equals(array2)

      Parameters:
        `self` - a double array
        `right` - the array being compared
      Returns:
        true if the contents of both arrays are equal.
      Since:
        5.0.0

    - #### public static boolean equals(Object[] left, List<?> right)

      Determines if the contents of this array are equal to the contents of the given list, in the same order. This returns `false` if either collection is `null`.

      Parameters:
        `left` - an array
        `right` - the List being compared
      Returns:
        `true` if the contents of both collections are equal.
      Since:
        1.5.0

    - #### public static boolean every(boolean[] self)

      Iterates over the contents of a boolean Array, and checks whether every element is true.

           boolean[] array1 = [false, true]
           assert !array1.every()
           boolean[] array2 = [true, true]
           assert array2.every()

      Parameters:
        `self` - the boolean array over which we iterate
      Returns:
        true if no boolean is false
      Since:
        5.0.0

    - #### public static boolean every(boolean[] self, @ClosureParams(FirstParam.Component.class)
      Closure<?> predicate)

      Iterates over the contents of a boolean Array, and checks whether a predicate is valid for every element.

           boolean[] array = [true]
           assert array.every{ it }
           assert !array.every{ !it }

      Parameters:
        `self` - the boolean array over which we iterate
        `predicate` - the closure predicate used for matching
      Returns:
        true if the predicate returns true for all elements in the array
      Since:
        5.0.0

    - #### public static boolean every(byte[] self, @ClosureParams(FirstParam.Component.class)
      Closure<?> predicate)

      Iterates over the contents of a byte Array, and checks whether a predicate is valid for all elements.

           byte[] array = [0, 1, 2]
           assert array.every{ it < 3 }
           assert !array.every{ it > 1 }

      Parameters:
        `self` - the byte array over which we iterate
        `predicate` - the closure predicate used for matching
      Returns:
        true if the predicate returns true for all elements in the array
      Since:
        5.0.0

    - #### public static boolean every(char[] self, @ClosureParams(FirstParam.Component.class)
      Closure<?> predicate)

      Iterates over the contents of a char Array, and checks whether a predicate is valid for all elements.

           char[] array = ['a', 'b', 'c']
           assert array.every{ it <= 'd' }
           assert !array.every{ it > 'b' }

      Parameters:
        `self` - the char array over which we iterate
        `predicate` - the closure predicate used for matching
      Returns:
        true if the predicate returns true for all elements in the array
      Since:
        5.0.0

    - #### public static boolean every(short[] self, @ClosureParams(FirstParam.Component.class)
      Closure<?> predicate)

      Iterates over the contents of a short Array, and checks whether a predicate is valid for all elements.

           short[] array = [0, 1, 2]
           assert array.every{ it < 3 }
           assert !array.every{ it > 1 }

      Parameters:
        `self` - the char array over which we iterate
        `predicate` - the closure predicate used for matching
      Returns:
        true if the predicate returns true for all elements in the array
      Since:
        5.0.0

    - #### public static boolean every(int[] self, @ClosureParams(FirstParam.Component.class)
      Closure<?> predicate)

      Iterates over the contents of an int Array, and checks whether a predicate is valid for all elements.

           int[] array = [0, 1, 2]
           assert array.every{ it < 3 }
           assert !array.every{ it > 1 }

      Parameters:
        `self` - the int array over which we iterate
        `predicate` - the closure predicate used for matching
      Returns:
        true if the predicate returns true for all elements in the array
      Since:
        5.0.0

    - #### public static boolean every(long[] self, @ClosureParams(FirstParam.Component.class)
      Closure<?> predicate)

      Iterates over the contents of a long Array, and checks whether a predicate is valid for all elements.

           long[] array = [0L, 1L, 2L]
           assert array.every{ it < 3L }
           assert !array.every{ it > 1L }

      Parameters:
        `self` - the long array over which we iterate
        `predicate` - the closure predicate used for matching
      Returns:
        true if the predicate returns true for all elements in the array
      Since:
        5.0.0

    - #### public static boolean every(float[] self, @ClosureParams(FirstParam.Component.class)
      Closure<?> predicate)

      Iterates over the contents of a float Array, and checks whether a predicate is valid for all elements.

           float[] array = [0.0f, 1.0f, 2.0f]
           assert array.every{ it < 2.5f }
           assert !array.every{ it > 1.5f }

      Parameters:
        `self` - the float array over which we iterate
        `predicate` - the closure predicate used for matching
      Returns:
        true if the predicate returns true for all elements in the array
      Since:
        5.0.0

    - #### public static boolean every(double[] self, @ClosureParams(FirstParam.Component.class)
      Closure<?> predicate)

      Iterates over the contents of a double Array, and checks whether a predicate is valid for all elements.

           double[] array = [0.0d, 1.0d, 2.0d]
           assert array.every{ it < 2.5d }
           assert !array.every{ it > 1.5d }

      Parameters:
        `self` - the double array over which we iterate
        `predicate` - the closure predicate used for matching
      Returns:
        true if the predicate returns true for all elements in the array
      Since:
        5.0.0

    - #### <T> public static boolean every(T[] self, @ClosureParams(FirstParam.Component.class)
      Closure<?> predicate)

      Used to determine if the given predicate closure is valid (i.e. returns `true` for all items in this Array).

      Parameters:
        `self` - an array
        `predicate` - the closure predicate used for matching
      Returns:
        true if the predicate returns true for all elements in the array
      Since:
        2.5.0

    - #### <T> public static T find(T[] self, @ClosureParams(FirstParam.Component.class)
      Closure<?> condition)

      Finds the first element in the array that matches the given closure condition. Example:

           def list = [1,2,3] as Integer[]
           assert 2 == list.find { it > 1 }
           assert null == list.find { it > 5 }

      Parameters:
        `self` - an array
        `condition` - a closure condition
      Returns:
        The first element from the array that matches the condition or null if no element matches.
      Since:
        2.0

    - #### <T> public static List<T> findAll(T[] self)

      Finds the elements of the array matching the IDENTITY Closure (i.e. matching Groovy truth).

           def items = [1, 2, 0, false, true, '', 'foo', [], [4, 5], null] as Object[]
           assert items.findAll() == [1, 2, true, 'foo', [4, 5]]

      Parameters:
        `self` - an array
      Returns:
        A list of the truthy values.
      See Also:
        Closure.IDENTITY
      Since:
        2.0

    - #### <T> public static List<T> findAll(T[] self, @ClosureParams(FirstParam.Component.class)
      Closure<?> condition)

      Finds all elements of the array matching the given Closure condition.

           def items = [1,2,3,4] as Integer[]
           assert [2,4] == items.findAll { it % 2 == 0 }

      Parameters:
        `self` - an array
        `condition` - a closure condition
      Returns:
        A list of the matching values.
      Since:
        2.0

    - #### <T> public static int findIndexOf(T[] self, @ClosureParams(FirstParam.Component.class)
      Closure<?> condition)

      Iterates over the elements of an array and returns the index of the first item that satisfies the condition specified by the closure.

      Parameters:
        `self` - an array
        `condition` - the matching condition
      Returns:
        The index of the first matched object or -1 if no match was found.
      Since:
        2.5.0

    - #### <T> public static int findIndexOf(T[] self, int startIndex, @ClosureParams(FirstParam.Component.class)
      Closure<?> condition)

      Iterates over the elements of an array, starting from a specified index, and returns the index of the first item that satisfies the condition specified by the closure.

      Parameters:
        `self` - an array
        `startIndex` - start matching from this index
        `condition` - the matching condition
      Returns:
        The index of the first matched object or -1 if no match was found.
      Since:
        2.5.0

    - #### <T> public static List<Number> findIndexValues(T[] self, @ClosureParams(FirstParam.Component.class)
      Closure<?> condition)

      Iterates over the elements of an array and returns the index values of the items that match the condition specified in the closure.

      Parameters:
        `self` - an array
        `condition` - the matching condition
      Returns:
        a list of numbers corresponding to the index values of all matched objects
      Since:
        2.5.0

    - #### <T> public static List<Number> findIndexValues(T[] self, Number startIndex, @ClosureParams(FirstParam.Component.class)
      Closure<?> condition)

      Iterates over the elements of an array, starting from a specified index, and returns the index values of the items that match the condition specified in the closure.

      Parameters:
        `self` - an array
        `startIndex` - start matching from this index
        `condition` - the matching condition
      Returns:
        a list of numbers corresponding to the index values of all matched objects
      Since:
        2.5.0

    - #### <T> public static int findLastIndexOf(T[] self, @ClosureParams(FirstParam.Component.class)
      Closure<?> condition)

      Returns the index of the last item that matches the specified condition.

           def array = new Number[]{1, 2, 1, 2, 1}
           assert array.findLastIndexOf{it==1} ==  4
           assert array.findLastIndexOf{it==2} ==  3
           assert array.findLastIndexOf{it==3} == -1
           assert array.findLastIndexOf{it>=0} ==  4
           assert array.findLastIndexOf{it<=0} == -1
           def empty = new Object[0]
           assert empty.findLastIndexOf {true} == -1

      Parameters:
        `self` - an array
        `condition` - the matching condition
      Returns:
        The index of the last matched object or -1 if no match was found.
      Since:
        2.5.0

    - #### <T> public static int findLastIndexOf(T[] self, int lowerBound, @ClosureParams(FirstParam.Component.class)
      Closure<?> condition)

      Returns the index of the last item that matches the specified condition that is at or beyond the given index.

           def array = new Number[]{3, 1, 2, 1, 2, 1}
           assert array.findLastIndexOf(1,{it==0}) == -1
           assert array.findLastIndexOf(1,{it==1}) ==  5
           assert array.findLastIndexOf(1,{it==2}) ==  4
           assert array.findLastIndexOf(1,{it==3}) == -1
           assert array.findLastIndexOf(0,{it==3}) ==  0
           def empty = new Object[0]
           assert empty.findLastIndexOf( 2,{true}) == -1
           assert empty.findLastIndexOf(-2,{true}) == -1

      Parameters:
        `self` - an array
        `lowerBound` - the minimum index
        `condition` - the matching condition
      Returns:
        The index of the last matched object or -1 if no match was found.
      Since:
        2.5.0

    - #### <T> public static T findResult(T[] self)

      Iterates through the Array stopping once the first non-null result is found and returning that result. If all results are null, null is returned.

      Parameters:
        `self` - an array
      Returns:
        The first non-null result from calling the closure, or null.
      Since:
        4.0.9

    - #### <T, U extends T, V extends T> public static T findResult(U[] self, V defaultResult)

      Iterates through the Array stopping once the first non-null result is found and returning that result. If all are null, the defaultResult is returned.

      Parameters:
        `self` - an Array
        `defaultResult` - an Object that should be returned if all elements are null
      Returns:
        the first non-null result from calling the closure, or the defaultValue
      Since:
        4.0.9

    - #### <S, T> public static T findResult(S[] self, @ClosureParams(FirstParam.Component.class)
      Closure<T> condition)

      Iterates through the Array calling the given closure condition for each item but stopping once the first non-null result is found and returning that result. If all results are null, null is returned.

      Parameters:
        `self` - an array
        `condition` - a closure that returns a non-null value to indicate that processing should stop and the value should be returned
      Returns:
        The first non-null result from calling the closure, or null.
      Since:
        2.5.0

    - #### <S, T, U extends T, V extends T> public static T findResult(S[] self, U defaultResult, @ClosureParams(FirstParam.Component.class)
      Closure<V> condition)

      Iterates through the Array calling the given closure condition for each item but stopping once the first non-null result is found and returning that result. If all are null, the defaultResult is returned.

      Parameters:
        `self` - an array
        `defaultResult` - a value that should be returned if all closure results are null
        `condition` - a closure that returns a non-null value to indicate that processing should stop and the value should be returned
      Returns:
        The first non-null result from calling the closure, or the defaultValue.
      Since:
        2.5.0

    - #### <T> public static Collection<T> findResults(T[] self)

      Iterates through the Array collecting any non-null results.

      Parameters:
        `self` - an array
      Returns:
        The list of non-null values.
      Since:
        4.0.9

    - #### <T, U> public static Collection<T> findResults(U[] self, @ClosureParams(FirstParam.Component.class)
      Closure<T> filteringTransform)

      Iterates through the Array transforming items using the supplied closure and collecting any non-null results.

      Parameters:
        `self` - an array
        `filteringTransform` - a closure that should return either a non-null transformed value or null for items which should be discarded
      Returns:
        The list of non-null transformed values.
      Since:
        2.5.0

    - #### public static boolean first(boolean[] self)

      Returns the first item from the boolean array.

           boolean[] array = [true, false]
           assert array.first() == true

      An alias for `head()`.
      throws:
        NoSuchElementException if the array is empty
      Parameters:
        `self` - an array
      Returns:
        the first element
      Since:
        5.0.0

    - #### public static byte first(byte[] self)

      Returns the first item from the byte array.

           byte[] bytes = [1, 2, 3]
           assert bytes.first() == 1

      An alias for `head()`.
      throws:
        NoSuchElementException if the array is empty
      Parameters:
        `self` - an array
      Returns:
        the first element
      Since:
        5.0.0

    - #### public static char first(char[] self)

      Returns the first item from the char array.

           char[] chars = ['a', 'b', 'c']
           assert chars.first() == 'a'

      An alias for `head()`.
      throws:
        NoSuchElementException if the array is empty
      Parameters:
        `self` - an array
      Returns:
        the first element
      Since:
        5.0.0

    - #### public static short first(short[] self)

      Returns the first item from the short array.

           short[] shorts = [10, 20, 30]
           assert shorts.first() == 10

      An alias for `head()`.
      throws:
        NoSuchElementException if the array is empty
      Parameters:
        `self` - an array
      Returns:
        the first element
      Since:
        5.0.0

    - #### public static int first(int[] self)

      Returns the first item from the int array.

           int[] ints = [1, 3, 5]
           assert ints.first() == 1

      An alias for `head()`.
      throws:
        NoSuchElementException if the array is empty
      Parameters:
        `self` - an array
      Returns:
        the first element
      Since:
        5.0.0

    - #### public static long first(long[] self)

      Returns the first item from the long array.

           long[] longs = [2L, 4L, 6L]
           assert longs.first() == 2L

      An alias for `head()`.
      throws:
        NoSuchElementException if the array is empty
      Parameters:
        `self` - an array
      Returns:
        the first element
      Since:
        5.0.0

    - #### public static float first(float[] self)

      Returns the first item from the float array.

           float[] floats = [2.0f, 4.0f, 6.0f]
           assert floats.first() == 2.0f

      An alias for `head()`.
      throws:
        NoSuchElementException if the array is empty
      Parameters:
        `self` - an array
      Returns:
        the first element
      Since:
        5.0.0

    - #### public static double first(double[] self)

      Returns the first item from the double array.

           double[] doubles = [10.0d, 20.0d, 30.0d]
           assert doubles.first() == 10.0d

      An alias for `head()`.
      throws:
        NoSuchElementException if the array is empty
      Parameters:
        `self` - an array
      Returns:
        the first element
      Since:
        5.0.0

    - #### <T> public static T first(T[] self)

      Returns the first item from the array.

           def array = [3, 4, 2].toArray()
           assert array.first() == 3

      throws:
        NoSuchElementException if the array is empty
      Parameters:
        `self` - an array
      Returns:
        the first item from the array
      Since:
        1.7.3

    - #### public static List<Boolean> flatten(boolean[] self)

      Flattens an array. This array is added to a new collection. It is an alias for `toList()` but allows algorithms to be written which also work on multidimensional arrays or non-arrays where flattening would be applicable.

           boolean[] array = [false, true]
           assert array.flatten() == [false, true]

      Parameters:
        `self` - a boolean Array
      Returns:
        a Collection of the array elements
      Since:
        1.6.0

    - #### public static List<Byte> flatten(byte[] self)

      Flattens an array. This array is added to a new collection. It is an alias for `toList()` but allows algorithms to be written which also work on multidimensional arrays or non-arrays where flattening would be applicable.

           byte[] array = [0, 1]
           assert array.flatten() == [0, 1]

      Parameters:
        `self` - a byte Array
      Returns:
        a Collection of the array elements
      Since:
        1.6.0

    - #### public static List<Character> flatten(char[] self)

      Flattens an array. This array is added to a new collection. It is an alias for `toList()` but allows algorithms to be written which also work on multidimensional arrays or non-arrays where flattening would be applicable.

           char[] array = 'ab'.chars
           assert array.flatten() == ['a', 'b']

      Parameters:
        `self` - a char Array
      Returns:
        a Collection of the array elements
      Since:
        1.6.0

    - #### public static List<Short> flatten(short[] self)

      Flattens an array. This array is added to a new collection. It is an alias for `toList()` but allows algorithms to be written which also work on multidimensional arrays or non-arrays where flattening would be applicable.

           short[] array = [0, 1]
           assert array.flatten() == [0, 1]

      Parameters:
        `self` - a short Array
      Returns:
        a Collection of the array elements
      Since:
        1.6.0

    - #### public static List<Integer> flatten(int[] self)

      Flattens an array. This array is added to a new collection. It is an alias for `toList()` but allows algorithms to be written which also work on multidimensional arrays or non-arrays where flattening would be applicable.

           int[] array = [0, 1]
           assert array.flatten() == [0, 1]

      Parameters:
        `self` - an int Array
      Returns:
        a Collection of the array elements
      Since:
        1.6.0

    - #### public static List<Long> flatten(long[] self)

      Flattens an array. This array is added to a new collection. It is an alias for `toList()` but allows algorithms to be written which also work on multidimensional arrays or non-arrays where flattening would be applicable.

           long[] array = [0L, 1L]
           assert array.flatten() == [0L, 1L]

      Parameters:
        `self` - a long Array to flatten
      Returns:
        a Collection of the array elements
      Since:
        1.6.0

    - #### public static List<Float> flatten(float[] self)

      Flattens an array. This array is added to a new collection. It is an alias for `toList()` but allows algorithms to be written which also work on multidimensional arrays or non-arrays where flattening would be applicable.

           float[] array = [0.0f, 1.0f]
           assert array.flatten() == [0.0f, 1.0f]

      Parameters:
        `self` - a float Array to flatten
      Returns:
        a Collection of the array elements
      Since:
        1.6.0

    - #### public static List<Double> flatten(double[] self)

      Flattens an array. This array is added to a new collection. It is an alias for `toList()` but allows algorithms to be written which also work on multidimensional arrays or non-arrays where flattening would be applicable.

           double[] array = [0.0d, 1.0d]
           assert array.flatten() == [0.0d, 1.0d]

      Parameters:
        `self` - a double Array to flatten
      Returns:
        a Collection of the array elements
      Since:
        1.6.0

    - #### public static List<Object> flatten(Object[] self)

      Flattens an array. This array and any nested arrays or collections have their contents (recursively) added to the new collection.

      Parameters:
        `self` - an Array to flatten
      Returns:
        S flattened Collection
      Since:
        1.6.0

    - #### public static List<Boolean> flatten(boolean self)

      Flattens a 2D array into a new collection. The items are copied row by row.

      Example usage:

           boolean[][] array = [[true, false], [true, false]]
           assert array.flatten() == [true, false, true, false]

      Parameters:
        `self` - a 2D boolean Array
      Returns:
        a Collection of the array elements
      Since:
        5.0.0

    - #### public static List<Byte> flatten(byte self)

      Flattens a 2D array into a new collection. The items are copied row by row.

      Example usage:

           byte[][] array = [[0, 1], [2, 3]]
           assert array.flatten() == [0, 1, 2, 3]

      Parameters:
        `self` - a 2D byte Array
      Returns:
        a Collection of the array elements
      Since:
        5.0.0

    - #### public static List<Character> flatten(char self)

      Flattens a 2D array into a new collection. The items are copied row by row.

      Example usage:

           char[][] array = ['ab'.chars, 'cd'.chars]
           assert array.flatten() == ['a', 'b', 'c', 'd']

      Parameters:
        `self` - a 2D char Array
      Returns:
        a Collection of the array elements
      Since:
        5.0.0

    - #### public static List<Short> flatten(short self)

      Flattens a 2D array into a new collection. The items are copied row by row.

      Example usage:

           short[][] array = [[0, 1], [2, 3]]
           assert array.flatten() == [0, 1, 2, 3]

      Parameters:
        `self` - a 2D short Array
      Returns:
        a Collection of the array elements
      Since:
        5.0.0

    - #### public static List<Integer> flatten(int self)

      Flattens a 2D array into a new collection. The items are copied row by row.

      Example usage:

           int[][] array = [[0, 1], [2, 3]]
           assert array.flatten() == [0, 1, 2, 3]

      Parameters:
        `self` - a 2D int Array
      Returns:
        a Collection of the array elements
      Since:
        5.0.0

    - #### public static List<Long> flatten(long self)

      Flattens a 2D array into a new collection. The items are copied row by row.

      Example usage:

           long[][] array = [[0, 1], [2, 3]]
           assert array.flatten() == [0, 1, 2, 3]

      Parameters:
        `self` - a 2D long Array
      Returns:
        a Collection of the array elements
      Since:
        5.0.0

    - #### public static List<Float> flatten(float self)

      Flattens a 2D array into a new collection. The items are copied row by row.

      Example usage:

           float[][] array = [[0.0f, 1.0f], [2.0f, 3.0f]]
           assert array.flatten() == [0.0f, 1.0f, 2.0f, 3.0f]

      Parameters:
        `self` - a 2D float Array
      Returns:
        a Collection of the array elements
      Since:
        5.0.0

    - #### public static List<Double> flatten(double self)

      Flattens a 2D array into a new collection. The items are copied row by row.

      Example usage:

           double[][] array = [[0.0f, 1.0f], [2.0f, 3.0f]]
           assert array.flatten() == [0.0f, 1.0f, 2.0f, 3.0f]

      Parameters:
        `self` - a 2D double Array
      Returns:
        a Collection of the array elements
      Since:
        5.0.0

    - #### public static Collection flattenMany(Object[] self, Closure<?> transform)

      Flatten an array. This array and any nested arrays, collections or optionals have their contents (recursively) added to a new collection. A transform is applied to any leaf nodes before further flattening.

      Parameters:
        `self` - an array
        `transform` - a transform applied to any leaf elements
      Returns:
        a flattened Collection
      Since:
        5.0.0

    - #### @SuppressWarnings("unchecked")
      public static List<Boolean> getAt(boolean[] array, Range<?> range)

      Supports the subscript operator for a boolean array with a range giving the desired indices.

           boolean[] array = [false, true, false, true, false, true]
           assert array[2..<2] == [] // EmptyRange
           assert array[(0..5.5).step(2)] == [false, false, false] // NumberRange
           assert array[(1..5.5).step(2)] == [true, true, true]    // NumberRange

      Parameters:
        `array` - a boolean array
        `range` - a range indicating the indices for the items to retrieve
      Returns:
        list of the retrieved booleans
      Since:
        1.0

    - #### @SuppressWarnings("unchecked")
      public static List<Byte> getAt(byte[] array, Range<?> range)

      Supports the subscript operator for a byte array with a range giving the desired indices.

           byte[] array = [1, 3, 5, 7, 9, 11]
           assert array[2..<2] == [] // EmptyRange
           assert array[(0..5.5).step(2)] == [1, 5, 9]   // NumberRange
           assert array[(1..5.5).step(2)] == [3, 7, 11]  // NumberRange

      Parameters:
        `array` - a byte array
        `range` - a range indicating the indices for the items to retrieve
      Returns:
        list of the retrieved bytes
      Since:
        1.0

    - #### @SuppressWarnings("unchecked")
      public static List<Character> getAt(char[] array, Range<?> range)

      Supports the subscript operator for a char array with a range giving the desired indices.

           char[] array = 'abcdef'.chars
           assert array[2..<2] == [] // EmptyRange
           assert array[(0..5.5).step(2)] == ['a', 'c', 'e']  // NumberRange
           assert array[(1..5.5).step(2)] == ['b', 'd', 'f']  // NumberRange

      Parameters:
        `array` - a char array
        `range` - a range indicating the indices for the items to retrieve
      Returns:
        list of the retrieved chars
      Since:
        1.5.0

    - #### @SuppressWarnings("unchecked")
      public static List<Short> getAt(short[] array, Range<?> range)

      Supports the subscript operator for a short array with a range giving the desired indices.

           short[] array = [1, 3, 5, 7, 9, 11]
           assert array[2..<2] == [] // EmptyRange
           assert array[(0..5.5).step(2)] == [1, 5, 9]   // NumberRange
           assert array[(1..5.5).step(2)] == [3, 7, 11]  // NumberRange

      Parameters:
        `array` - a short array
        `range` - a range indicating the indices for the items to retrieve
      Returns:
        list of the retrieved shorts
      Since:
        1.0

    - #### @SuppressWarnings("unchecked")
      public static List<Integer> getAt(int[] array, Range<?> range)

      Supports the subscript operator for an int array with a range giving the desired indices.

           int[] array = [1, 3, 5, 7, 9, 11]
           assert array[2..<2] == [] // EmptyRange
           assert array[(0..5.5).step(2)] == [1, 5, 9]   // NumberRange
           assert array[(1..5.5).step(2)] == [3, 7, 11]  // NumberRange

      Parameters:
        `array` - an int array
        `range` - a range indicating the indices for the items to retrieve
      Returns:
        list of the ints at the given indices
      Since:
        1.0

    - #### @SuppressWarnings("unchecked")
      public static List<Long> getAt(long[] array, Range<?> range)

      Supports the subscript operator for a long array with a range giving the desired indices.

           long[] array = [1L, 3L, 5L, 7L, 9L, 11L]
           assert array[2..<2] == [] // EmptyRange
           assert array[(0..5.5).step(2)] == [1L, 5L, 9L]   // NumberRange
           assert array[(1..5.5).step(2)] == [3L, 7L, 11L]  // NumberRange

      Parameters:
        `array` - a long array
        `range` - a range indicating the indices for the items to retrieve
      Returns:
        list of the retrieved longs
      Since:
        1.0

    - #### @SuppressWarnings("unchecked")
      public static List<Float> getAt(float[] array, Range<?> range)

      Supports the subscript operator for a float array with a range giving the desired indices.

           float[] array = [1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f]
           assert array[2..<2] == [] // EmptyRange
           assert array[(0..5.5).step(2)] == [1.0f, 5.0f, 9.0f]   // NumberRange
           assert array[(1..5.5).step(2)] == [3.0f, 7.0f, 11.0f]  // NumberRange

      Parameters:
        `array` - a float array
        `range` - a range indicating the indices for the items to retrieve
      Returns:
        list of the retrieved floats
      Since:
        1.0

    - #### @SuppressWarnings("unchecked")
      public static List<Double> getAt(double[] array, Range<?> range)

      Supports the subscript operator for a double array with a range giving the desired indices.

           double[] array = [1.0d, 3.0d, 5.0d, 7.0d, 9.0d, 11.0d]
           assert array[2..<2] == [] // EmptyRange
           assert array[(0..5.5).step(2)] == [1.0d, 5.0d, 9.0d]   // NumberRange
           assert array[(1..5.5).step(2)] == [3.0d, 7.0d, 11.0d]  // NumberRange

      Parameters:
        `array` - a double array
        `range` - a range indicating the indices for the items to retrieve
      Returns:
        list of the retrieved doubles
      Since:
        1.0

    - #### <T> public static List<T> getAt(T[] array, Range<?> range)

      Supports the subscript operator for an object array with a range giving the desired indices.

      Parameters:
        `array` - an Array of Objects
        `range` - a Range
      Returns:
        a range of a list from the range's from index up to but not including the range's to value
      Since:
        1.0

    - #### @SuppressWarnings("unchecked")
      public static List<Boolean> getAt(boolean[] array, IntRange range)

      Supports the subscript operator for a boolean array with an IntRange giving the desired indices.

           boolean[] array = [false, false, true, true, false]
           assert array[2..3] == [true, true]
           assert array[-2..-1] == [true, false]
           assert array[-1..-2] == [false, true]

      Parameters:
        `array` - a boolean array
        `range` - an IntRange indicating the indices for the items to retrieve
      Returns:
        list of the retrieved booleans
      Since:
        1.0

    - #### @SuppressWarnings("unchecked")
      public static List<Byte> getAt(byte[] array, IntRange range)

      Supports the subscript operator for a byte array with an IntRange giving the desired indices.

           byte[] array = [0, 10, 20, 30, 40]
           assert array[2..3] == [20, 30]
           assert array[-2..-1] == [30, 40]
           assert array[-1..-2] == [40, 30]

      Parameters:
        `array` - a byte array
        `range` - an IntRange indicating the indices for the items to retrieve
      Returns:
        list of the retrieved bytes
      Since:
        1.0

    - #### @SuppressWarnings("unchecked")
      public static List<Character> getAt(char[] array, IntRange range)

      Supports the subscript operator for a char array with an IntRange giving the desired indices.

           char[] array = 'abcdef'.chars
           assert array[2..3] == ['c', 'd']
           assert array[-2..-1] == ['e', 'f']
           assert array[-1..-2] == ['f', 'e']

      Parameters:
        `array` - a char array
        `range` - an IntRange indicating the indices for the items to retrieve
      Returns:
        list of the retrieved chars
      Since:
        1.0

    - #### @SuppressWarnings("unchecked")
      public static List<Short> getAt(short[] array, IntRange range)

      Supports the subscript operator for a short array with an IntRange giving the desired indices.

           short[] array = [0, 10, 20, 30, 40]
           assert array[2..3] == [20, 30]
           assert array[-2..-1] == [30, 40]
           assert array[-1..-2] == [40, 30]

      Parameters:
        `array` - a short array
        `range` - an IntRange indicating the indices for the items to retrieve
      Returns:
        list of the retrieved shorts
      Since:
        1.0

    - #### @SuppressWarnings("unchecked")
      public static List<Integer> getAt(int[] array, IntRange range)

      Supports the subscript operator for an int array with an IntRange giving the desired indices.

           int[] array = [0, 10, 20, 30, 40]
           assert array[2..3] == [20, 30]
           assert array[-2..-1] == [30, 40]
           assert array[-1..-2] == [40, 30]

      Parameters:
        `array` - an int array
        `range` - an IntRange indicating the indices for the items to retrieve
      Returns:
        list of the retrieved ints
      Since:
        1.0

    - #### @SuppressWarnings("unchecked")
      public static List<Long> getAt(long[] array, IntRange range)

      Supports the subscript operator for a long array with an IntRange giving the desired indices.

           long[] array = [0L, 10L, 20L, 30L, 40L]
           assert array[2..3] == [20L, 30L]
           assert array[-2..-1] == [30L, 40L]
           assert array[-1..-2] == [40L, 30L]

      Parameters:
        `array` - a long array
        `range` - an IntRange indicating the indices for the items to retrieve
      Returns:
        list of the retrieved longs
      Since:
        1.0

    - #### @SuppressWarnings("unchecked")
      public static List<Float> getAt(float[] array, IntRange range)

      Supports the subscript operator for a float array with an IntRange giving the desired indices.

           float[] array = [0.0f, 10.0f, 20.0f, 30.0f, 40.0f]
           assert array[2..3] == [20.0f, 30.0f]
           assert array[-2..-1] == [30.0f, 40.0f]
           assert array[-1..-2] == [40.0f, 30.0f]

      Parameters:
        `array` - a float array
        `range` - an IntRange indicating the indices for the items to retrieve
      Returns:
        list of the retrieved floats
      Since:
        1.0

    - #### @SuppressWarnings("unchecked")
      public static List<Double> getAt(double[] array, IntRange range)

      Supports the subscript operator for a double array with an IntRange giving the desired indices.

           double[] array = [0.0d, 10.0d, 20.0d, 30.0d, 40.0d]
           assert array[2..3] == [20.0d, 30.0d]
           assert array[-2..-1] == [30.0d, 40.0d]
           assert array[-1..-2] == [40.0d, 30.0d]

      Parameters:
        `array` - a double array
        `range` - an IntRange indicating the indices for the items to retrieve
      Returns:
        list of the retrieved doubles
      Since:
        1.0

    - #### <T> public static List<T> getAt(T[] array, IntRange range)

      Supports the subscript operator for an object array with an IntRange giving the desired indices.

      Parameters:
        `array` - an object array
        `range` - an IntRange
      Returns:
        a range of a list from the range's from index up to but not including the range's to value
      Since:
        1.0

    - #### @SuppressWarnings("unchecked")
      public static List<Boolean> getAt(boolean[] array, ObjectRange range)

      Supports the subscript operator for a boolean array with an ObjectRange giving the desired indices.

           boolean[] array = [false, false, true, true, false]
           def range = new ObjectRange(2, 3)
           assert array[range] == [true, true]

      Parameters:
        `array` - a boolean array
        `range` - an ObjectRange indicating the indices for the items to retrieve
      Returns:
        list of the retrieved bytes
      Since:
        1.0

    - #### @SuppressWarnings("unchecked")
      public static List<Byte> getAt(byte[] array, ObjectRange range)

      Supports the subscript operator for a byte array with an ObjectRange giving the desired indices.

           byte[] array = [0, 10, 20, 30, 40]
           def range = new ObjectRange(2, 3)
           assert array[range] == [20, 30]

      Parameters:
        `array` - a byte array
        `range` - an ObjectRange indicating the indices for the items to retrieve
      Returns:
        list of the retrieved bytes
      Since:
        1.0

    - #### @SuppressWarnings("unchecked")
      public static List<Character> getAt(char[] array, ObjectRange range)

      Supports the subscript operator for a boolean array with an ObjectRange giving the desired indices.

           char[] array = 'abcdef'.chars
           def range = new ObjectRange(2, 3)
           assert array[range] == ['c', 'd']

      Parameters:
        `array` - a char array
        `range` - an ObjectRange indicating the indices for the items to retrieve
      Returns:
        list of the retrieved chars
      Since:
        1.0

    - #### @SuppressWarnings("unchecked")
      public static List<Short> getAt(short[] array, ObjectRange range)

      Supports the subscript operator for a short array with an ObjectRange giving the desired indices.

           short[] array = [0, 10, 20, 30, 40]
           def range = new ObjectRange(2, 3)
           assert array[range] == [20, 30]

      Parameters:
        `array` - a short array
        `range` - an ObjectRange indicating the indices for the items to retrieve
      Returns:
        list of the retrieved shorts
      Since:
        1.0

    - #### @SuppressWarnings("unchecked")
      public static List<Integer> getAt(int[] array, ObjectRange range)

      Supports the subscript operator for an int array with an ObjectRange giving the desired indices.

           int[] array = [0, 10, 20, 30, 40]
           def range = new ObjectRange(2, 3)
           assert array[range] == [20, 30]

      Parameters:
        `array` - an int array
        `range` - an ObjectRange indicating the indices for the items to retrieve
      Returns:
        list of the retrieved ints
      Since:
        1.0

    - #### @SuppressWarnings("unchecked")
      public static List<Long> getAt(long[] array, ObjectRange range)

      Supports the subscript operator for a long array with an ObjectRange giving the desired indices.

           long[] array = [0L, 10L, 20L, 30L, 40L]
           def range = new ObjectRange(2, 3)
           assert array[range] == [20L, 30L]

      Parameters:
        `array` - a long array
        `range` - an ObjectRange indicating the indices for the items to retrieve
      Returns:
        list of the retrieved longs
      Since:
        1.0

    - #### @SuppressWarnings("unchecked")
      public static List<Float> getAt(float[] array, ObjectRange range)

      Supports the subscript operator for a float array with an ObjectRange giving the desired indices.

           float[] array = [0.0f, 10.0f, 20.0f, 30.0f, 40.0f]
           def range = new ObjectRange(2, 3)
           assert array[range] == [20.0f, 30.0f]

      Parameters:
        `array` - a float array
        `range` - an ObjectRange indicating the indices for the items to retrieve
      Returns:
        list of the retrieved floats
      Since:
        1.0

    - #### @SuppressWarnings("unchecked")
      public static List<Double> getAt(double[] array, ObjectRange range)

      Supports the subscript operator for a double array with an ObjectRange giving the desired indices.

           double[] array = [0.0d, 10.0d, 20.0d, 30.0d, 40.0d]
           def range = new ObjectRange(2, 3)
           assert array[range] == [20.0d, 30.0d]

      Parameters:
        `array` - a double array
        `range` - an ObjectRange indicating the indices for the items to retrieve
      Returns:
        list of the retrieved doubles
      Since:
        1.0

    - #### <T> public static List<T> getAt(T[] array, ObjectRange range)

      Supports the subscript operator for an object array with an ObjectRange giving the desired indices.

      Parameters:
        `array` - an Array of Objects
        `range` - an ObjectRange
      Returns:
        a range of a list from the range's from index up to but not including the range's to value
      Since:
        1.0

    - #### <T> public static List<T> getAt(T[] array, EmptyRange<?> range)

      Supports the subscript operator for an object array with an EmptyRange.

      Parameters:
        `array` - an Array of Objects
        `range` - an EmptyRange
      Returns:
        an empty Range
      Since:
        1.5.0

    - #### @SuppressWarnings("unchecked")
      public static List<Boolean> getAt(boolean[] array, Collection<?> indices)

      Supports the subscript operator for a boolean array with a (potentially nested) collection giving the desired indices.

           boolean[] array = [false, false, true, true, false]
           assert array[2, 3] == [true, true]
           assert array[0, 0..1, [1, [-1]]] == [false, false, false, false, false]

      Parameters:
        `array` - a boolean array
        `indices` - a collection of indices for the items to retrieve
      Returns:
        list of the booleans at the given indices
      Since:
        1.0

    - #### @SuppressWarnings("unchecked")
      public static List<Byte> getAt(byte[] array, Collection<?> indices)

      Supports the subscript operator for a byte array with a (potentially nested) collection giving the desired indices.

           byte[] array = [0, 2, 4, 6, 8]
           assert array[2, 3] == [4, 6]
           assert array[1, 0..1, [0, [-1]]] == [2, 0, 2, 0, 8]

      Parameters:
        `array` - a byte array
        `indices` - a collection of indices for the items to retrieve
      Returns:
        list of the bytes at the given indices
      Since:
        1.0

    - #### @SuppressWarnings("unchecked")
      public static List<Character> getAt(char[] array, Collection<?> indices)

      Supports the subscript operator for a char array with a (potentially nested) collection giving the desired indices.

           char[] array = 'abcde'.chars
           assert array[2, 3] == ['c', 'd']
           assert array[1, 0..1, [0, [-1]]] == ['b', 'a', 'b', 'a', 'e']

      Parameters:
        `array` - a char array
        `indices` - a collection of indices for the items to retrieve
      Returns:
        list of the chars at the given indices
      Since:
        1.0

    - #### @SuppressWarnings("unchecked")
      public static List<Short> getAt(short[] array, Collection<?> indices)

      Supports the subscript operator for a short array with a (potentially nested) collection giving the desired indices.

           short[] array = [0, 2, 4, 6, 8]
           assert array[2, 3] == [4, 6]
           assert array[1, 0..1, [0, [-1]]] == [2, 0, 2, 0, 8]

      Parameters:
        `array` - a short array
        `indices` - a collection of indices for the items to retrieve
      Returns:
        list of the shorts at the given indices
      Since:
        1.0

    - #### @SuppressWarnings("unchecked")
      public static List<Integer> getAt(int[] array, Collection<?> indices)

      Supports the subscript operator for an int array with a (potentially nested) collection giving the desired indices.

           int[] array = [0, 2, 4, 6, 8]
           assert array[2, 3] == [4, 6]
           assert array[1, 0..1, [0, [-1]]] == [2, 0, 2, 0, 8]

      Parameters:
        `array` - an int array
        `indices` - a collection of indices for the items to retrieve
      Returns:
        list of the ints at the given indices
      Since:
        1.0

    - #### @SuppressWarnings("unchecked")
      public static List<Long> getAt(long[] array, Collection<?> indices)

      Supports the subscript operator for a long array with a (potentially nested) collection giving the desired indices.

           long[] array = [0L, 2L, 4L, 6L, 8L]
           assert array[2, 3] == [4L, 6L]
           assert array[1, 0..1, [0, [-1]]] == [2L, 0L, 2L, 0L, 8L]

      Parameters:
        `array` - a long array
        `indices` - a collection of indices for the items to retrieve
      Returns:
        list of the longs at the given indices
      Since:
        1.0

    - #### @SuppressWarnings("unchecked")
      public static List<Float> getAt(float[] array, Collection<?> indices)

      Supports the subscript operator for a float array with a (potentially nested) collection giving the desired indices.

           float[] array = [0.0f, 2.0f, 4.0f, 6.0f, 8.0f]
           assert array[2, 3] == [4.0f, 6.0f]
           assert array[1, 0..1, [0, [-1]]] == [2.0f, 0.0f, 2.0f, 0.0f, 8.0f]

      Parameters:
        `array` - a float array
        `indices` - a collection of indices for the items to retrieve
      Returns:
        list of the floats at the given indices
      Since:
        1.0

    - #### @SuppressWarnings("unchecked")
      public static List<Double> getAt(double[] array, Collection<?> indices)

      Supports the subscript operator for a double array with a (potentially nested) collection giving the desired indices.

           double[] array = [0.0d, 2.0d, 4.0d, 6.0d, 8.0d]
           assert array[2, 3] == [4.0d, 6.0d]
           assert array[1, 0..1, [0, [-1]]] == [2.0d, 0.0d, 2.0d, 0.0d, 8.0d]

      Parameters:
        `array` - a double array
        `indices` - a collection of indices for the items to retrieve
      Returns:
        list of the doubles at the given indices
      Since:
        1.0

    - #### <T> public static List<T> getAt(T[] array, Collection<?> indices)

      Selects a List of items from an array using a Collection to identify the indices to be selected.

      Parameters:
        `array` - an object array
        `indices` - a collection of indices
      Returns:
        a new list of the values at the given indices
      Since:
        1.0

    - #### public static IntRange getIndices(boolean[] self)

      Returns indices of the boolean array.

           boolean[] array = [false, true]
           assert array.indices == 0..1

      See Also:
        ArrayGroovyMethods.getIndices
      Since:
        3.0.8

    - #### public static IntRange getIndices(byte[] self)

      Returns indices of the byte array.

           byte[] array = [0, 1]
           assert array.indices == 0..1

      See Also:
        ArrayGroovyMethods.getIndices
      Since:
        3.0.8

    - #### public static IntRange getIndices(char[] self)

      Returns indices of the char array.

           char[] array = 'ab'.chars
           assert array.indices == 0..1

      See Also:
        ArrayGroovyMethods.getIndices
      Since:
        3.0.8

    - #### public static IntRange getIndices(short[] self)

      Returns indices of the short array.

           short[] array = [0, 1]
           assert array.indices == 0..1

      See Also:
        ArrayGroovyMethods.getIndices
      Since:
        3.0.8

    - #### public static IntRange getIndices(int[] self)

      Returns indices of the int array.

           int[] array = [0, 1]
           assert array.indices == 0..1

      See Also:
        ArrayGroovyMethods.getIndices
      Since:
        3.0.8

    - #### public static IntRange getIndices(long[] self)

      Returns indices of the long array.

           long[] array = [0L, 1L]
           assert array.indices == 0..1

      See Also:
        ArrayGroovyMethods.getIndices
      Since:
        3.0.8

    - #### public static IntRange getIndices(float[] self)

      Returns indices of the float array.

           float[] array = [0.0f, 1.0f]
           assert array.indices == 0..1

      See Also:
        ArrayGroovyMethods.getIndices
      Since:
        3.0.8

    - #### public static IntRange getIndices(double[] self)

      Returns indices of the double array.

           double[] array = [0.0d, 1.0d]
           assert array.indices == 0..1

      See Also:
        ArrayGroovyMethods.getIndices
      Since:
        3.0.8

    - #### <T> public static IntRange getIndices(T[] self)

      Returns indices of the array.

      Example:

           String[] letters = ['a', 'b', 'c', 'd']
           assert 0..<4 == letters.indices

      Parameters:
        `self` - an array
      Returns:
        an index range
      Since:
        2.4.0

    - #### <T> public static List<T> grep(T[] self)

      Iterates over the array returning each element that matches using the IDENTITY Closure as a filter - effectively returning all elements which satisfy Groovy truth.

      Example:

           def items = [1, 2, 0, false, true, '', 'foo', [], [4, 5], null] as Object[]
           assert items.grep() == [1, 2, true, 'foo', [4, 5]]

      Parameters:
        `self` - an array
      Returns:
        a list of elements which satisfy Groovy truth
      See Also:
        Closure.IDENTITY
      Since:
        2.0

    - #### <T> public static List<T> grep(T[] self, Object filter)

      Iterates over the array of items and returns a collection of items that match the given filter - calling the DefaultGroovyMethods.isCase method used by switch statements. This method can be used with different kinds of filters like regular expressions, classes, ranges etc. Example:

           def items = ['a', 'b', 'aa', 'bc', 3, 4.5] as Object[]
           assert items.grep( ~/a+/ )  == ['a', 'aa']
           assert items.grep( ~/../ )  == ['aa', 'bc']
           assert items.grep( Number ) == [ 3, 4.5 ]
           assert items.grep{ it.toString().size() == 1 } == [ 'a', 'b', 3 ]

      Parameters:
        `self` - an array
        `filter` - the filter to perform on each element of the array (using the DefaultGroovyMethods.isCase method)
      Returns:
        a list of objects which match the filter
      Since:
        2.0

    - #### <K, T> public static Map<K, List<T>> groupBy(T[] self, @ClosureParams(FirstParam.Component.class)
      Closure<K> closure)

      Sorts all array members into groups determined by the supplied mapping closure. The closure should return the key that this item should be grouped by. The returned LinkedHashMap will have an entry for each distinct key returned from the closure, with each value being a list of items for that group.

      Example usage:

           Integer[] items = [1,2,3,4,5,6]
           assert [0:[2,4,6], 1:[1,3,5]] == items.groupBy { it % 2 }

      Parameters:
        `self` - an array to group
        `closure` - a closure mapping entries on keys
      Returns:
        A map grouped by keys.
      Since:
        2.2.0

    - #### public static Map groupBy(Object[] self, Object closures)

      Sorts all array members into (sub)groups determined by the supplied mapping closures as per the Iterable variant of this method.

      Parameters:
        `self` - an array to group
        `closures` - an array of closures, each mapping entries on keys
      Returns:
        A map grouped by keys on each criterion.
      Since:
        2.2.0

    - #### public static Map groupBy(Object[] self, List<Closure<?>> closures)

      Sorts all array members into (sub)groups determined by the supplied mapping closures as per the list variant of this method.

      Parameters:
        `self` - an array to group
        `closures` - a list of closures, each mapping entries on keys
      Returns:
        A map grouped by keys on each criterion.
      Since:
        2.2.0

    - #### public static boolean head(boolean[] self)

      Returns the first item from the boolean array.

           boolean[] array = [true, false]
           assert array.head() == true

      An alias for `first()`.
      throws:
        NoSuchElementException if the array is empty
      Parameters:
        `self` - an array
      Returns:
        the first element
      Since:
        5.0.0

    - #### public static byte head(byte[] self)

      Returns the first item from the byte array.

           byte[] bytes = [1, 2, 3]
           assert bytes.head() == 1

      An alias for `first()`.
      throws:
        NoSuchElementException if the array is empty
      Parameters:
        `self` - an array
      Returns:
        the first element
      Since:
        5.0.0

    - #### public static char head(char[] self)

      Returns the first item from the char array.

           char[] chars = ['a', 'b', 'c']
           assert chars.head() == 'a'

      An alias for `first()`.
      throws:
        NoSuchElementException if the array is empty
      Parameters:
        `self` - an array
      Returns:
        the first element
      Since:
        5.0.0

    - #### public static short head(short[] self)

      Returns the first item from the short array.

           short[] shorts = [10, 20, 30]
           assert shorts.head() == 10

      An alias for `first()`.
      throws:
        NoSuchElementException if the array is empty
      Parameters:
        `self` - an array
      Returns:
        the first element
      Since:
        5.0.0

    - #### public static int head(int[] self)

      Returns the first item from the int array.

           int[] ints = [1, 3, 5]
           assert ints.head() == 1

      An alias for `first()`.
      throws:
        NoSuchElementException if the array is empty
      Parameters:
        `self` - an array
      Returns:
        the first element
      Since:
        5.0.0

    - #### public static long head(long[] self)

      Returns the first item from the long array.

           long[] longs = [2L, 4L, 6L]
           assert longs.head() == 2L

      An alias for `first()`.
      throws:
        NoSuchElementException if the array is empty
      Parameters:
        `self` - an array
      Returns:
        the first element
      Since:
        5.0.0

    - #### public static float head(float[] self)

      Returns the first item from the float array.

           float[] floats = [2.0f, 4.0f, 6.0f]
           assert floats.head() == 2.0f

      An alias for `first()`.
      throws:
        NoSuchElementException if the array is empty
      Parameters:
        `self` - an array
      Returns:
        the first element
      Since:
        5.0.0

    - #### public static double head(double[] self)

      Returns the first item from the double array.

           double[] doubles = [10.0d, 20.0d, 30.0d]
           assert doubles.head() == 10.0d

      An alias for `first()`.
      throws:
        NoSuchElementException if the array is empty
      Parameters:
        `self` - an array
      Returns:
        the first element
      Since:
        5.0.0

    - #### <T> public static T head(T[] self)

      Returns the first item from the Object array.

          def array = [3, 4, 2].toArray()
           assert array.head() == 3

      throws:
        NoSuchElementException if the array is empty
      Parameters:
        `self` - an array
      Returns:
        the first item from the Object array
      Since:
        1.7.3

    - #### public static int indexOf(Object[] self, Object object)

      Returns the index of the first occurrence of the specified element in the array. That is, the lowest index `i` such that `Objects.equals(array[i], object)` or -1 if there is no such index.

           String[] array = ['foo','bar','foo']
           assert array.indexOf('foo') ==  0
           assert array.indexOf('bar') ==  1
           assert array.indexOf('baz') == -1
           assert array.indexOf(12345) == -1

      Since:
        5.0.0

    - #### public static Map<Integer, Integer> indexed(int[] self)

      Zips an int[] with indices in (index, value) order starting from index 0.

      Example usage:

           int[] nums = [10, 20, 30]
           assert [0: 10, 1: 20, 2: 30] == nums.indexed()

      See Also:
        indexed(int[], int)
      Since:
        3.0.8

    - #### public static Map<Integer, Long> indexed(long[] self)

      Zips a long[] with indices in (index, value) order starting from index 0.

      Example usage:

           long[] nums = [10L, 20L, 30L]
           assert [0: 10L, 1: 20L, 2: 30L] == nums.indexed()

      See Also:
        indexed(long[], int)
      Since:
        3.0.8

    - #### public static Map<Integer, Float> indexed(float[] self)

      Zips a float[] with indices in (index, value) order starting from index 0.

      Example usage:

           float[] nums = [10.0f, 20.0f, 30.0f]
           assert [0: 10.0f, 1: 20.0f, 2: 30.0f] == nums.indexed()

      See Also:
        indexed(float[], int)
      Since:
        5.0.0

    - #### public static Map<Integer, Double> indexed(double[] self)

      Zips a double[] with indices in (index, value) order starting from index 0.

      Example usage:

           double[] nums = [10.0d, 20.0d, 30.0d]
           assert [0: 10.0d, 1: 20.0d, 2: 30.0d] == nums.indexed()

      See Also:
        indexed(double[], int)
      Since:
        3.0.8

    - #### public static Map<Integer, Integer> indexed(int[] self, int offset)

      Zips an int[] with indices in (index, value) order starting from a given index.

      Example usage:

           int[] nums = [10, 20, 30]
           assert [5: 10, 6: 20, 7: 30] == nums.indexed(5)
           assert ["1: 10", "2: 20", "3: 30"] == nums.indexed(1).collect { idx, str -> "$idx: $str" }

      Parameters:
        `self` - an int array
        `offset` - an index to start from
      Returns:
        a Map (since the keys/indices are unique) containing the elements from the iterable zipped with indices
      See Also:
        DefaultGroovyMethods.indexed
      Since:
        3.0.8

    - #### public static Map<Integer, Long> indexed(long[] self, int offset)

      Zips a long[] with indices in (index, value) order starting from a given index.

      Example usage:

           long[] nums = [10L, 20L, 30L]
           assert [5: 10L, 6: 20L, 7: 30L] == nums.indexed(5)

      Parameters:
        `self` - a long array
        `offset` - an index to start from
      Returns:
        a Map (since the keys/indices are unique) containing the elements from the iterable zipped with indices
      See Also:
        DefaultGroovyMethods.indexed
      Since:
        3.0.8

    - #### public static Map<Integer, Float> indexed(float[] self, int offset)

      Zips a float[] with indices in (index, value) order starting from a given index.

      Example usage:

           float[] nums = [10.0f, 20.0f, 30.0f]
           assert [5: 10.0f, 6: 20.0f, 7: 30.0f] == nums.indexed(5)

      Parameters:
        `self` - a float[]
        `offset` - an index to start from
      Returns:
        a Map (since the keys/indices are unique) containing the elements from the iterable zipped with indices
      See Also:
        DefaultGroovyMethods.indexed
      Since:
        5.0.0

    - #### public static Map<Integer, Double> indexed(double[] self, int offset)

      Zips a double[] with indices in (index, value) order starting from a given index.

      Example usage:

           double[] nums = [10.0d, 20.0d, 30.0d]
           assert [5: 10.0d, 6: 20.0d, 7: 30.0d] == nums.indexed(5)

      Parameters:
        `self` - a double[]
        `offset` - an index to start from
      Returns:
        a Map (since the keys/indices are unique) containing the elements from the iterable zipped with indices
      See Also:
        DefaultGroovyMethods.indexed
      Since:
        3.0.8

    - #### <T> public static Map<Integer, T> indexed(T[] self)

      Zips an object array with indices in (index, value) order starting from index 0.

      Example usage:

           String[] letters = 'A'..'C'
           assert [0: 'A', 1: 'B', 2: 'C'] == letters.indexed()

      See Also:
        indexed(Object[], int)
      Since:
        5.0.0

    - #### <T> public static Map<Integer, T> indexed(T[] self, int offset)

      Zips an object array with indices in (index, value) order starting from a given index.

      Example usage:

           String[] letters = 'A'..'C'
           assert [5: 'A', 6: 'B', 7: 'C'] == letters.indexed(5)
           assert ["1: A", "2: B", "3: C"] == letters.indexed(1).collect { idx, str -> "$idx: $str" }

      Parameters:
        `self` - an Object array
        `offset` - an index to start from
      Returns:
        a Map (since the keys/indices are unique) containing the elements from the iterable zipped with indices
      See Also:
        DefaultGroovyMethods.indexed
      Since:
        5.0.0

    - #### public static boolean[] init(boolean[] self)

      Returns the items from the boolean array excluding the last item.

           boolean[] array = [true, false, true]
           def result = array.init()
           assert result == [true, false]
           assert array.class.componentType == result.class.componentType

      throws:
        UnsupportedOperationException if the array is empty
      Parameters:
        `self` - an array
      Returns:
        an array without its last element
      Since:
        5.0.0

    - #### public static byte[] init(byte[] self)

      Returns the items from the byte array excluding the last item.

           byte[] bytes = [1, 2, 3]
           def result = bytes.init()
           assert result == [1, 2]
           assert bytes.class.componentType == result.class.componentType

      throws:
        UnsupportedOperationException if the array is empty
      Parameters:
        `self` - an array
      Returns:
        an array without its last element
      Since:
        5.0.0

    - #### public static char[] init(char[] self)

      Returns the items from the char array excluding the last item.

           char[] chars = ['a', 'b', 'c']
           def result = chars.init()
           assert result == ['a', 'b']
           assert chars.class.componentType == result.class.componentType

      throws:
        UnsupportedOperationException if the array is empty
      Parameters:
        `self` - an array
      Returns:
        an array without its last element
      Since:
        5.0.0

    - #### public static short[] init(short[] self)

      Returns the items from the short array excluding the last item.

           short[] shorts = [10, 20, 30]
           def result = shorts.init()
           assert result == [10, 20]
           assert shorts.class.componentType == result.class.componentType

      throws:
        UnsupportedOperationException if the array is empty
      Parameters:
        `self` - an array
      Returns:
        an array without its last element
      Since:
        5.0.0

    - #### public static int[] init(int[] self)

      Returns the items from the int array excluding the last item.

           int[] ints = [1, 3, 5]
           def result = ints.init()
           assert result == [1, 3]
           assert ints.class.componentType == result.class.componentType

      throws:
        UnsupportedOperationException if the array is empty
      Parameters:
        `self` - an array
      Returns:
        an array without its last element
      Since:
        5.0.0

    - #### public static long[] init(long[] self)

      Returns the items from the long array excluding the last item.

           long[] longs = [2L, 4L, 6L]
           def result = longs.init()
           assert result == [2L, 4L]
           assert longs.class.componentType == result.class.componentType

      throws:
        UnsupportedOperationException if the array is empty
      Parameters:
        `self` - an array
      Returns:
        an array without its last element
      Since:
        5.0.0

    - #### public static float[] init(float[] self)

      Returns the items from the float array excluding the last item.

           float[] floats = [2.0f, 4.0f, 6.0f]
           def result = floats.init()
           assert result == [2.0f, 4.0f]
           assert floats.class.componentType == result.class.componentType

      throws:
        UnsupportedOperationException if the array is empty
      Parameters:
        `self` - an array
      Returns:
        an array without its last element
      Since:
        5.0.0

    - #### public static double[] init(double[] self)

      Returns the items from the double array excluding the last item.

           double[] doubles = [10.0d, 20.0d, 30.0d]
           def result = doubles.init()
           assert result == [10.0d, 20.0d]
           assert doubles.class.componentType == result.class.componentType

      throws:
        UnsupportedOperationException if the array is empty
      Parameters:
        `self` - an array
      Returns:
        an array without its last element
      Since:
        5.0.0

    - #### <T> public static T[] init(T[] self)

      Returns the items from the Object array excluding the last item.

               String[] strings = ["a", "b", "c"]
               def result = strings.init()
               assert result.length == 2
               assert strings.class.componentType == String

      throws:
        UnsupportedOperationException if the array is empty
      Parameters:
        `self` - an array
      Returns:
        an array without its last element
      Since:
        2.4.0

    - #### <E extends T, T, V extends T> public static T inject(E[] self, @ClosureParams(value=FromString.class,options="T,E")
      Closure<V> closure)

      Iterates through the given array, passing the first two elements to the closure. The result is passed back (injected) to the closure along with the third element and so on until all array elements have been consumed.

           def array = new Number[] {1, 2, 3, 4}
           def value = array.inject { acc, val -> acc * val }
           assert value == 24

           array = new Object[] {['a','b'], ['b','c'], ['d','b']}
           value = array.inject { acc, val -> acc.intersect(val) }
           assert value == ['b']

           array = new String[] {'t', 'i', 'm'}
           value = array.inject { acc, val -> acc + val }
           assert value == 'tim'

      throws:
        NoSuchElementException if the array is empty
      Parameters:
        `self` - an array
        `closure` - a closure
      Returns:
        first value for single-element array or the result of the last closure call
      See Also:
        inject(Object[], Object, Closure)
      Since:
        1.8.7

    - #### <E, T, U extends T, V extends T> public static T inject(E[] self, U initialValue, @ClosureParams(value=FromString.class,options="T,E")
      Closure<V> closure)

      Iterates through the given array, passing in the initial value and the first element to the closure. The result is sent back (injected) with the second element. The new result is injected back into the closure with the third element and so on until all elements have been consumed.

           def array = new Number[] {2, 3, 4}
           def value = array.inject(1) { acc, val -> acc * val }
           assert value == 24

           array = new Object[] {['a','b'], ['b','c'], ['d','b']}
           value = array.inject(['a','b','c']) { acc, val -> acc.intersect(val) }
           assert value == ['b']

           array = new String[] {'t', 'i', 'm'}
           value = array.inject("") { acc, val -> acc + val }
           assert value == 'tim'

      Parameters:
        `self` - an array
        `initialValue` - base value
        `closure` - a closure
      Returns:
        base value for empty array or the result of the last closure call
      Since:
        1.5.0

    - #### <E extends T, T, V extends T> public static List<T> injectAll(E[] self, @ClosureParams(value=FromString.class,options="T,E")
      Closure<V> closure)

      Iterates through the given array, injecting values as per `inject` but returns the list of all calculated values instead of just the final result.

      Since:
        5.0.0

    - #### <E, T, U extends T, V extends T> public static List<T> injectAll(E[] self, U initialValue, @ClosureParams(value=FromString.class,options="T,E")
      Closure<V> closure)

      Iterates through the given array, injecting values as per `inject` but returns the list of all calculated values instead of just the final result.

           Integer[] nums = 1..5
           var prefixSum = nums.injectAll(0, Integer::sum)
           Arrays.parallelPrefix(nums, Integer::sum) // built-in JDK mutating method
           assert nums == prefixSum

      Since:
        5.0.0

    - #### <T> public static Iterator<T> iterator(T[] self)

      Returns an Iterator which traverses the given array in index order.

      Parameters:
        `self` - an array
      Returns:
        an Iterator backed by the given Array.
      See Also:
        ArrayIterator
      Since:
        1.6.4

    - #### public static String join(boolean[] self)

      Concatenates the string representation of each item in this array.

      Parameters:
        `self` - an array of boolean
      Returns:
        the joined String
      Since:
        5.0.0

    - #### public static String join(byte[] self)

      Concatenates the string representation of each item in this array.

      Parameters:
        `self` - an array of byte
      Returns:
        the joined String
      Since:
        5.0.0

    - #### public static String join(char[] self)

      Concatenates the string representation of each item in this array.

      Parameters:
        `self` - an array of char
      Returns:
        the joined String
      Since:
        5.0.0

    - #### public static String join(short[] self)

      Concatenates the string representation of each item in this array.

      Parameters:
        `self` - an array of short
      Returns:
        the joined String
      Since:
        5.0.0

    - #### public static String join(int[] self)

      Concatenates the string representation of each item in this array.

      Parameters:
        `self` - an array of int
      Returns:
        the joined String
      Since:
        5.0.0

    - #### public static String join(long[] self)

      Concatenates the string representation of each item in this array.

      Parameters:
        `self` - an array of long
      Returns:
        the joined String
      Since:
        5.0.0

    - #### public static String join(float[] self)

      Concatenates the string representation of each item in this array.

      Parameters:
        `self` - an array of float
      Returns:
        the joined String
      Since:
        5.0.0

    - #### public static String join(double[] self)

      Concatenates the string representation of each item in this array.

      Parameters:
        `self` - an array of double
      Returns:
        the joined String
      Since:
        5.0.0

    - #### public static String join(Object[] self)

      Concatenates the string representation of each item in this array.

           def array = new Number[]{1,2L,3G}
           assert array.join() == "123"

      Parameters:
        `self` - an array of Object
      Returns:
        the joined String
      Since:
        5.0.0

    - #### public static String join(boolean[] self, String separator)

      Concatenates the string representation of each item in this array, with the given String as a separator between each item.

      Parameters:
        `self` - an array of boolean
        `separator` - a String separator
      Returns:
        the joined String
      Since:
        2.4.1

    - #### public static String join(byte[] self, String separator)

      Concatenates the string representation of each item in this array, with the given String as a separator between each item.

      Parameters:
        `self` - an array of byte
        `separator` - a String separator
      Returns:
        the joined String
      Since:
        2.4.1

    - #### public static String join(char[] self, String separator)

      Concatenates the string representation of each item in this array, with the given String as a separator between each item.

      Parameters:
        `self` - an array of char
        `separator` - a String separator
      Returns:
        the joined String
      Since:
        2.4.1

    - #### public static String join(short[] self, String separator)

      Concatenates the string representation of each item in this array, with the given String as a separator between each item.

      Parameters:
        `self` - an array of short
        `separator` - a String separator
      Returns:
        the joined String
      Since:
        2.4.1

    - #### public static String join(int[] self, String separator)

      Concatenates the string representation of each item in this array, with the given String as a separator between each item.

      Parameters:
        `self` - an array of int
        `separator` - a String separator
      Returns:
        the joined String
      Since:
        2.4.1

    - #### public static String join(long[] self, String separator)

      Concatenates the string representation of each item in this array, with the given String as a separator between each item.

      Parameters:
        `self` - an array of long
        `separator` - a String separator
      Returns:
        the joined String
      Since:
        2.4.1

    - #### public static String join(float[] self, String separator)

      Concatenates the string representation of each item in this array, with the given String as a separator between each item.

      Parameters:
        `self` - an array of float
        `separator` - a String separator
      Returns:
        the joined String
      Since:
        2.4.1

    - #### public static String join(double[] self, String separator)

      Concatenates the string representation of each item in this array, with the given String as a separator between each item.

      Parameters:
        `self` - an array of double
        `separator` - a String separator
      Returns:
        the joined String
      Since:
        2.4.1

    - #### public static String join(Object[] self, String separator)

      Concatenates the string representation of each item in this array, with the given String as a separator between each item.

           Serializable[] array = [1,2L,-3G]
           assert array.join("+") == "1+2+-3"

      Parameters:
        `self` - an array of Object
        `separator` - a String separator
      Returns:
        the joined String
      Since:
        1.0

    - #### public static boolean last(boolean[] self)

      Returns the last item from the boolean array.

           boolean[] array = [true, false, true]
           assert array.last() == true

      throws:
        NoSuchElementException if the array is empty
      Parameters:
        `self` - an array
      Returns:
        the last element
      Since:
        5.0.0

    - #### public static byte last(byte[] self)

      Returns the last item from the byte array.

           byte[] bytes = [1, 2, 3]
           assert bytes.last() == 3

      throws:
        NoSuchElementException if the array is empty
      Parameters:
        `self` - an array
      Returns:
        the last element
      Since:
        5.0.0

    - #### public static char last(char[] self)

      Returns the last item from the char array.

           char[] chars = ['a', 'b', 'c']
           assert chars.last() == 'c'

      throws:
        NoSuchElementException if the array is empty
      Parameters:
        `self` - an array
      Returns:
        the last element
      Since:
        5.0.0

    - #### public static short last(short[] self)

      Returns the last item from the short array.

           short[] shorts = [10, 20, 30]
           assert shorts.last() == 30

      throws:
        NoSuchElementException if the array is empty
      Parameters:
        `self` - an array
      Returns:
        the last element
      Since:
        5.0.0

    - #### public static int last(int[] self)

      Returns the last item from the int array.

           int[] ints = [1, 3, 5]
           assert ints.last() == 5

      throws:
        NoSuchElementException if the array is empty
      Parameters:
        `self` - an array
      Returns:
        the last element
      Since:
        5.0.0

    - #### public static long last(long[] self)

      Returns the last item from the long array.

           long[] longs = [2L, 4L, 6L]
           assert longs.last() == 6L

      throws:
        NoSuchElementException if the array is empty
      Parameters:
        `self` - an array
      Returns:
        the last element
      Since:
        5.0.0

    - #### public static float last(float[] self)

      Returns the last item from the float array.

           float[] floats = [2.0f, 4.0f, 6.0f]
           assert floats.last() == 6.0f

      throws:
        NoSuchElementException if the array is empty
      Parameters:
        `self` - an array
      Returns:
        the last element
      Since:
        5.0.0

    - #### public static double last(double[] self)

      Returns the last item from the double array.

           double[] doubles = [10.0d, 20.0d, 30.0d]
           assert doubles.last() == 30.0d

      throws:
        NoSuchElementException if the array is empty
      Parameters:
        `self` - an array
      Returns:
        the last element
      Since:
        5.0.0

    - #### <T> public static T last(T[] self)

      Returns the last item from the array.

           def array = [3, 4, 2].toArray()
           assert array.last() == 2

      throws:
        NoSuchElementException if you try to access last() for an empty array
      Parameters:
        `self` - an array
      Returns:
        the last item from the array
      Since:
        1.7.3

    - #### public static int lastIndexOf(Object[] self, Object object)

      Returns the index of the last occurrence of the specified element in the array. That is, the highest index `i` such that `Objects.equals(array[i], object)` or -1 if there is no such index.

           String[] array = ['foo','bar','foo']
           assert array.lastIndexOf('foo') ==  2
           assert array.lastIndexOf('bar') ==  1
           assert array.lastIndexOf('baz') == -1
           assert array.lastIndexOf(12345) == -1

      Since:
        5.0.0

    - #### public static int max(int[] self)

      Adds max() method to int arrays.

      Example usage:

           int[] nums = [1, 3, 2]
           assert 3 == nums.max()

      Parameters:
        `self` - an int array
      Returns:
        the maximum value
      Since:
        3.0.8

    - #### public static long max(long[] self)

      Adds max() method to long arrays.

      Example usage:

           long[] nums = [1L, 3L, 2L]
           assert 3L == nums.max()

      Parameters:
        `self` - a long array
      Returns:
        the maximum value
      Since:
        3.0.8

    - #### public static float max(float[] self)

      Adds max() method to float arrays.

      Example usage:

           float[] nums = [1.1f, 3.3f, 2.2f]
           assert 3.3f == nums.max()

      Parameters:
        `self` - a float array
      Returns:
        the maximum value
      Since:
        5.0.0

    - #### public static double max(double[] self)

      Adds max() method to double arrays.

      Example usage:

           double[] nums = [1.1d, 3.3d, 2.2d]
           assert 3.3d == nums.max()

      Parameters:
        `self` - a double array
      Returns:
        the maximum value
      Since:
        3.0.8

    - #### <T> public static T max(T[] self)

      Adds max() method to Object arrays.

      Parameters:
        `self` - an array
      Returns:
        the maximum value
      See Also:
        DefaultGroovyMethods.max
      Since:
        1.5.5

    - #### @Incubating
      public static int max(int[] self, IntComparator comparator)

      Selects the maximum value found from the int array using the supplied IntComparator to determine the maximum of any two values.

           int[] nums = [10, 20, -30]
           assert 20 == nums.max{ n, m -> n <=> m }
           assert -30 == nums.max{ n, m -> n.abs() <=> m.abs() }

      throws:
        UnsupportedOperationException if the array is empty
      Parameters:
        `self` - an int array
        `comparator` - a comparator, i.e. returns a negative value if the first parameter is less than the second
      Returns:
        the maximum value
      Since:
        5.0.0

    - #### @Incubating
      public static int max(int[] self, IntUnaryOperator operator)

      Selects the maximum value found from the int array using the supplied IntUnaryOperator to determine the maximum of any two values. The operator is applied to each array element and the results are compared.

           int[] nums = [10, 20, -30]
           assert 20 == nums.max{ it }
           assert -30 == nums.max{ it.abs() }

      throws:
        UnsupportedOperationException if the array is empty
      Parameters:
        `self` - an int array
        `operator` - an operator that returns an int used for comparing values
      Returns:
        the maximum value
      Since:
        5.0.0

    - #### @Incubating
      public static long max(long[] self, LongComparator comparator)

      Selects the maximum value found from the long array using the supplied LongBinaryOperator as a comparator to determine the maximum of any two values.

           long[] nums = [10L, 20L, -30L]
           assert 20L == nums.max{ n, m -> n <=> m }
           assert -30L == nums.max{ n, m -> n.abs() <=> m.abs() }

      throws:
        UnsupportedOperationException if the array is empty
      Parameters:
        `self` - a long array
        `comparator` - a comparator, i.e. returns a negative value if the first parameter is less than the second
      Returns:
        the maximum value
      Since:
        5.0.0

    - #### @Incubating
      public static long max(long[] self, LongUnaryOperator operator)

      Selects the maximum value found from the long array using the supplied LongUnaryOperator to determine the maximum of any two values. The operator is applied to each array element and the results are compared.

           long[] nums = [10L, 20L, -30L]
           assert 20L == nums.max{ it }
           assert -30L == nums.max{ it.abs() }

      throws:
        UnsupportedOperationException if the array is empty
      Parameters:
        `self` - a long array
        `operator` - an operator that returns a long used for comparing values
      Returns:
        the maximum value
      Since:
        5.0.0

    - #### @Incubating
      public static float max(float[] self, FloatComparator comparator)

      Selects the maximum value found from the float array using the supplied FloatComparator to determine the maximum of any two values.

           double[] nums = [10f, 20f, -30f]
           assert 20f == nums.max{ n, m -> n <=> m }
           assert -30f == nums.max{ n, m -> n.abs() <=> m.abs() }

      throws:
        UnsupportedOperationException if the array is empty
      Parameters:
        `self` - a float array
        `comparator` - a comparator, i.e. returns a negative value if the first parameter is less than the second
      Returns:
        the maximum value
      Since:
        5.0.0

    - #### @Incubating
      public static float max(float[] self, FloatUnaryOperator operator)

      Selects the maximum value found from the float array using the supplied FloatUnaryOperator to determine the maximum of any two values. The operator is applied to each array element and the results are compared.

           float[] nums = [10f, 20f, -30f]
           assert -30f == nums.max{ it.abs() }
           assert 20f == nums.max{ it }

      throws:
        UnsupportedOperationException if the array is empty
      Parameters:
        `self` - a float array
        `operator` - an operator that returns a float used for comparing values
      Returns:
        the maximum value
      Since:
        5.0.0

    - #### @Incubating
      public static double max(double[] self, DoubleComparator comparator)

      Selects the maximum value found from the double array using the supplied DoubleComparator to determine the maximum of any two values.

           double[] nums = [10d, 20d, -30d]
           assert 20d == nums.max{ n, m -> n <=> m }
           assert -30d == nums.max{ n, m -> n.abs() <=> m.abs() }

      throws:
        UnsupportedOperationException if the array is empty
      Parameters:
        `self` - a double array
        `comparator` - a comparator, i.e. returns a negative value if the first parameter is less than the second
      Returns:
        the maximum value
      Since:
        5.0.0

    - #### @Incubating
      public static double max(double[] self, DoubleUnaryOperator operator)

      Selects the maximum value found from the double array using the supplied DoubleUnaryOperator to determine the maximum of any two values. The operator is applied to each array element and the results are compared.

           double[] nums = [10d, 20d, -30d]
           assert -30d == nums.max{ it.abs() }
           assert 20d == nums.max{ it }

      throws:
        UnsupportedOperationException if the array is empty
      Parameters:
        `self` - a double array
        `operator` - an operator that returns a double used for comparing values
      Returns:
        the maximum value
      Since:
        5.0.0

    - #### <T> public static T max(T[] self, Comparator<? super T> comparator)

      Selects the maximum value found from the Object array using the given comparator.

      Parameters:
        `self` - an array
        `comparator` - a Comparator
      Returns:
        the maximum value
      See Also:
        DefaultGroovyMethods.max
      Since:
        1.5.5

    - #### <T> public static T max(T[] self, @ClosureParams(value=FromString.class,options={"T","T,T"})
      Closure<?> closure)

      Selects the maximum value found from the Object array using the closure to determine the correct ordering.

      If the closure has two parameters it is used like a traditional Comparator. I.e. it should compare its two parameters for order, returning a negative integer, zero, or a positive integer when the first parameter is less than, equal to, or greater than the second respectively. Otherwise, the Closure is assumed to take a single parameter and return a Comparable (typically an Integer) which is then used for further comparison.

      Parameters:
        `self` - an array
        `closure` - a Closure used to determine the correct ordering
      Returns:
        the maximum value
      Since:
        1.5.5

    - #### @Incubating
      public static int maxComparing(int[] self, Comparator<Integer> comparator)

      Selects the maximum value found from the int array using the comparator to determine the maximum of any two values.

           int[] nums = [10, 20, 30]
           assert 30 == nums.maxComparing(Comparator.naturalOrder())
           assert 10 == nums.maxComparing(Comparator.reverseOrder())

      Parameters:
        `self` - an int array
        `comparator` - a Comparator
      Returns:
        the maximum value
      See Also:
        DefaultGroovyMethods.max
      Since:
        5.0.0

    - #### @Incubating
      public static long maxComparing(long[] self, Comparator<Long> comparator)

      Selects the maximum value found from the long array using the comparator to determine the maximum of any two values.

           long[] nums = [10L, 20L, 30L]
           assert 30L == nums.maxComparing(Comparator.naturalOrder())
           assert 10L == nums.maxComparing(Comparator.reverseOrder())

      Parameters:
        `self` - a long array
        `comparator` - a Comparator
      Returns:
        the maximum value
      See Also:
        DefaultGroovyMethods.max
      Since:
        5.0.0

    - #### @Incubating
      public static float maxComparing(float[] self, Comparator<Float> comparator)

      Selects the maximum value found from the float array using the comparator to determine the maximum of any two values.

           double[] nums = [10.0f, 20.0f, 30.0f]
           assert 30f == nums.maxComparing(Comparator.naturalOrder())
           assert 10f == nums.maxComparing(Comparator.reverseOrder())

      Parameters:
        `self` - a float array
        `comparator` - a Comparator
      Returns:
        the maximum value
      See Also:
        DefaultGroovyMethods.max
      Since:
        5.0.0

    - #### @Incubating
      public static double maxComparing(double[] self, Comparator<Double> comparator)

      Selects the maximum value found from the double array using the comparator to determine the maximum of any two values.

           double[] nums = [10.0d, 20.0d, 30.0d]
           assert 30d == nums.maxComparing(Comparator.naturalOrder())
           assert 10d == nums.maxComparing(Comparator.reverseOrder())

      Parameters:
        `self` - a double array
        `comparator` - a Comparator
      Returns:
        the maximum value
      See Also:
        DefaultGroovyMethods.max
      Since:
        5.0.0

    - #### public static int min(int[] self)

      Adds min() method to int arrays.

      Example usage:

           int[] nums = [20, 10, 30]
           assert 10 == nums.min()

      Parameters:
        `self` - an int array
      Returns:
        the minimum value
      Since:
        3.0.8

    - #### public static long min(long[] self)

      Adds min() method to long arrays.

      Example usage:

           long[] nums = [20L, 10L, 30L]
           assert 10L == nums.min()

      Parameters:
        `self` - a long array
      Returns:
        the minimum value
      Since:
        3.0.8

    - #### public static float min(float[] self)

      Adds min() method to float arrays.

      Example usage:

           float[] nums = [1.1f, 3.3f, 2.2f]
           assert 1.1f == nums.min()

      Parameters:
        `self` - a float array
      Returns:
        the minimum value
      Since:
        5.0.0

    - #### public static double min(double[] self)

      Adds min() method to double arrays.

      Example usage:

           double[] nums = [20.0d, 10.0d, 30.0d]
           assert 10.0d == nums.min()

      Parameters:
        `self` - a double array
      Returns:
        the minimum value
      Since:
        3.0.8

    - #### <T> public static T min(T[] self)

      Adds min() method to Object arrays.

      Parameters:
        `self` - an array
      Returns:
        the minimum value
      See Also:
        DefaultGroovyMethods.min
      Since:
        1.5.5

    - #### @Incubating
      public static int min(int[] self, IntComparator comparator)

      Selects the minimum value found from the int array using the supplied IntComparator to determine the minimum of any two values.

           int[] nums = [10, -20, 30]
           assert -20 == nums.min{ n, m -> n <=> m }
           assert 10 == nums.min{ n, m -> n.abs() <=> m.abs() }

      throws:
        UnsupportedOperationException if the array is empty
      Parameters:
        `self` - an int array
        `comparator` - a comparator, i.e. returns a negative value if the first parameter is less than the second
      Returns:
        the minimum value
      Since:
        5.0.0

    - #### @Incubating
      public static int min(int[] self, IntUnaryOperator operator)

      Selects the minimum value found from the int array using the supplied IntUnaryOperator to determine the minimum of any two values. The operator is applied to each array element and the results are compared.

           int[] nums = [10, -20, 30]
           assert -20 == nums.min{ n -> n }
           assert 10 == nums.min{ n -> n.abs() }

      throws:
        UnsupportedOperationException if the array is empty
      Parameters:
        `self` - an int array
        `operator` - an operator that returns an int used for comparing values
      Returns:
        the minimum value
      Since:
        5.0.0

    - #### @Incubating
      public static long min(long[] self, LongComparator comparator)

      Selects the minimum value found from the long array using the supplied LongComparator to determine the minimum of any two values.

           long[] nums = [10L, -20L, 30L]
           assert -20L == nums.min{ n, m -> n <=> m }
           assert 10L == nums.min{ n, m -> n.abs() <=> m.abs() }

      throws:
        UnsupportedOperationException if the array is empty
      Parameters:
        `self` - a long array
        `comparator` - a comparator, i.e. returns a negative value if the first parameter is less than the second
      Returns:
        the minimum value
      Since:
        5.0.0

    - #### @Incubating
      public static long min(long[] self, LongUnaryOperator operator)

      Selects the minimum value found from the long array using the supplied LongUnaryOperator to determine the minimum of any two values. The operator is applied to each array element and the results are compared.

           long[] nums = [10L, -20L, 30L]
           assert -20L == nums.min{ it }
           assert 10L == nums.min{ it.abs() }

      throws:
        UnsupportedOperationException if the array is empty
      Parameters:
        `self` - a long array
        `operator` - an operator that returns a long used for comparing values
      Returns:
        the minimum value
      Since:
        5.0.0

    - #### @Incubating
      public static float min(float[] self, FloatComparator comparator)

      Selects the minimum value found from the float array using the supplied FloatComparator to determine the minimum of any two values.

           double[] nums = [10f, -20f, 30f]
           assert -20f == nums.min{ n, m -> n <=> m }
           assert 10f == nums.min{ n, m -> n.abs() <=> m.abs() }

      throws:
        UnsupportedOperationException if the array is empty
      Parameters:
        `self` - a float array
        `comparator` - a comparator, i.e. returns a negative value if the first parameter is less than the second
      Returns:
        the minimum value
      Since:
        5.0.0

    - #### @Incubating
      public static float min(float[] self, FloatUnaryOperator operator)

      Selects the minimum value found from the float array using the supplied FloatUnaryOperator to determine the minimum of any two values. The operator is applied to each array element and the results are compared.

           double[] nums = [10f, -20f, 30f]
           assert -20f == nums.min{ it }
           assert 10f == nums.min{ it.abs() }

      throws:
        UnsupportedOperationException if the array is empty
      Parameters:
        `self` - a double array
        `operator` - an operator that returns a double used for comparing values
      Returns:
        the minimum value
      Since:
        5.0.0

    - #### @Incubating
      public static double min(double[] self, DoubleComparator comparator)

      Selects the minimum value found from the double array using the supplied DoubleComparator to determine the minimum of any two values.

           double[] nums = [10d, -20d, 30d]
           assert -20d == nums.min{ n, m -> n <=> m }
           assert 10d == nums.min{ n, m -> n.abs() <=> m.abs() }

      throws:
        UnsupportedOperationException if the array is empty
      Parameters:
        `self` - a double array
        `comparator` - a comparator, i.e. returns a negative value if the first parameter is less than the second
      Returns:
        the minimum value
      Since:
        5.0.0

    - #### @Incubating
      public static double min(double[] self, DoubleUnaryOperator operator)

      Selects the minimum value found from the double array using the supplied DoubleUnaryOperator to determine the minimum of any two values. The operator is applied to each array element and the results are compared.

           double[] nums = [10d, -20d, 30d]
           assert -20d == nums.min{ it }
           assert 10d == nums.min{ it.abs() }

      throws:
        UnsupportedOperationException if the array is empty
      Parameters:
        `self` - a double array
        `operator` - an operator that returns a double used for comparing values
      Returns:
        the minimum value
      Since:
        5.0.0

    - #### <T> public static T min(T[] self, Comparator<? super T> comparator)

      Selects the minimum value found from the Object array using the given comparator.

      Parameters:
        `self` - an array
        `comparator` - a Comparator
      Returns:
        the minimum value
      See Also:
        DefaultGroovyMethods.min
      Since:
        1.5.5

    - #### <T> public static T min(T[] self, @ClosureParams(value=FromString.class,options={"T","T,T"})
      Closure<?> closure)

      Selects the minimum value found from the Object array using the closure to determine the correct ordering.

      If the closure has two parameters it is used like a traditional Comparator. I.e. it should compare its two parameters for order, returning a negative integer, zero, or a positive integer when the first parameter is less than, equal to, or greater than the second respectively. Otherwise, the Closure is assumed to take a single parameter and return a Comparable (typically an Integer) which is then used for further comparison.

      Parameters:
        `self` - an array
        `closure` - a Closure used to determine the correct ordering
      Returns:
        the minimum value
      See Also:
        DefaultGroovyMethods.min
      Since:
        1.5.5

    - #### @Incubating
      public static int minComparing(int[] self, Comparator<Integer> comparator)

      Selects the minimum value found from the int array using the comparator to determine the minimum of any two values.

           int[] nums = [1, 2, 3]
           assert 1 == nums.minComparing(Comparator.naturalOrder())
           assert 3 == nums.minComparing(Comparator.reverseOrder())

      Parameters:
        `self` - an int array
        `comparator` - a Comparator
      Returns:
        the minimum value
      See Also:
        DefaultGroovyMethods.min
      Since:
        5.0.0

    - #### @Incubating
      public static long minComparing(long[] self, Comparator<Long> comparator)

      Selects the minimum value found from the long array using the comparator to determine the minimum of any two values.

           long[] nums = [10L, 20L, 30L]
           assert 10L == nums.minComparing(Comparator.naturalOrder())
           assert 30L == nums.minComparing(Comparator.reverseOrder())

      Parameters:
        `self` - a long array
        `comparator` - a Comparator
      Returns:
        the minimum value
      See Also:
        DefaultGroovyMethods.min
      Since:
        5.0.0

    - #### @Incubating
      public static float minComparing(float[] self, Comparator<Float> comparator)

      Selects the minimum value found from the float array using the comparator to determine the minimum of any two values.

           double[] nums = [10.0f, 20.0f, 30.0f]
           assert 10f == nums.minComparing(Comparator.naturalOrder())
           assert 30f == nums.minComparing(Comparator.reverseOrder())

      Parameters:
        `self` - a float array
        `comparator` - a Comparator
      Returns:
        the minimum value
      See Also:
        DefaultGroovyMethods.min
      Since:
        5.0.0

    - #### @Incubating
      public static double minComparing(double[] self, Comparator<Double> comparator)

      Selects the minimum value found from the double array using the comparator to determine the minimum of any two values.

           double[] nums = [10.0d, 20.0d, 30.0d]
           assert 10d == nums.minComparing(Comparator.naturalOrder())
           assert 30d == nums.minComparing(Comparator.reverseOrder())

      Parameters:
        `self` - a double array
        `comparator` - a Comparator
      Returns:
        the minimum value
      See Also:
        DefaultGroovyMethods.min
      Since:
        5.0.0

    - #### <T> public static T[] minus(T[] self, Iterable<?> removeMe)

      Creates a new array composed of the elements of the first array minus the elements of the given Iterable.

           Integer[] ints = [1, 2, 3, 1]
           List<Integer> nope = [1, 3]
           def result = ints - nope
           assert result.class == Integer[]
           assert result == new Integer[]{2}

           Integer[] none = []
           result = none - 123
           assert result !== none
           assert result.length == 0
           assert result.class == Integer[]

      Parameters:
        `self` - an array
        `removeMe` - an Iterable of elements to remove
      Returns:
        An array with the supplied elements removed.
      Since:
        1.5.5

    - #### <T> public static T[] minus(T[] self, Object[] removeMe)

      Creates a new array composed of the elements of the first array minus the elements of the given array.

           Integer[] ints = [1, 2, 3, 1]
           Integer[] nope = [1, 3]
           def result = ints - nope
           assert result.class == Integer[]
           assert result == new Integer[]{2}

           Integer[] none = []
           result = none - 123
           assert result !== none
           assert result.length == 0
           assert result.class == Integer[]

      Parameters:
        `self` - an array
        `removeMe` - an array of elements to remove
      Returns:
        An array with the supplied elements removed.
      Since:
        1.5.5

    - #### <T> public static T[] minus(T[] self, Object removeMe)

      Creates a new array composed of the elements of the given array minus every occurrence the given object.

           Integer[] ints = [1, 2, 3, 1]
           def result = ints - 1
           assert result.class == Integer[]
           assert result == new Integer[]{2, 3}

           Integer[] none = []
           result = none - '1'
           assert result !== none
           assert result.length == 0
           assert result.class == Integer[]

      Parameters:
        `self` - an array
        `removeMe` - an element to remove from the array
      Returns:
        a new array with the operand removed
      Since:
        1.5.5

    - #### <T> public static int partitionPoint(T[] self, IntRange range, Predicate<T> condition)

      Returns the index of the partition point according to the given predicate (the index of the first element of the second partition). The arr is assumed to be partitioned according to the given predicate.

           def arr = [7, 15, 3, 5, 4, 12, 6] as Integer[]
           assert arr.partitionPoint(0..<arr.size()) { it%2 != 0 } == 4

           def arr = [1, 2, 3, 3, 4, 4, 5, 6, 7] as Integer[]
           // usage case like lower_bound(cpp), bisect_left(python)
           assert arr.partitionPoint(0..<arr.size()) { it < 4 } == 4
           // usage case like upper_bound(cpp), bisect_right(python)
           assert arr.partitionPoint(0..<arr.size()) { it <= 4 } == 6
           // for all match condition
           assert arr.partitionPoint(0..<arr.size()) { it <= 100 } == arr.size()
           // for no match condition
           assert arr.partitionPoint(0..<arr.size()) { it <= 0 } == 0
           // for no match condition with range
           assert arr.partitionPoint(2..<arr.size()) { it <= 0 } == 2

      Parameters:
        `self` - a groovy arr
        `range` - the range [l,r] to find data match the condition
        `condition` - the matching condition
      Returns:
        an integer that is the index of the first element of the second partition
      Since:
        5.0.0

    - #### <T> public static int partitionPoint(T[] self, Predicate<T> condition)

      Returns the index of the partition point according to the given predicate (the index of the first element of the second partition). The arr is assumed to be partitioned according to the given predicate.

           def arr = [7, 15, 3, 5, 4, 12, 6] as Integer[]
           assert arr.partitionPoint{ it%2 != 0 } == 4

           def arr = [1, 2, 3, 3, 4, 4, 5, 6, 7] as Integer[]
           // usage case like lower_bound(cpp), bisect_left(python)
           assert arr.partitionPoint{ it < 4 } == 4
           // usage case like upper_bound(cpp), bisect_right(python)
           assert arr.partitionPoint{ it <= 4 } == 6
           // for all match condition
           assert arr.partitionPoint{ it <= 100 } == arr.size()
           // for no match condition
           assert arr.partitionPoint{ it <= 0 } == 0

      Parameters:
        `self` - a groovy arr
        `condition` - the matching condition
      Returns:
        an integer that is the index of the first element of the second partition
      Since:
        5.0.0

    - #### public static int partitionPoint(char[] self, IntRange range, IntPredicate condition)

      Returns the index of the partition point according to the given predicate (the index of the first element of the second partition). The arr is assumed to be partitioned according to the given predicate.

           def arr = [7, 15, 3, 5, 4, 12, 6] as char[]
           assert arr.partitionPoint(0..<arr.size()) { it%2 != 0 } == 4

           def arr = [1, 2, 3, 3, 4, 4, 5, 6, 7] as char[]
           // usage case like lower_bound(cpp), bisect_left(python)
           assert arr.partitionPoint(0..<arr.size()) { it < 4 } == 4
           // usage case like upper_bound(cpp), bisect_right(python)
           assert arr.partitionPoint(0..<arr.size()) { it <= 4 } == 6
           // for all match condition
           assert arr.partitionPoint(0..<arr.size()) { it <= 100 } == arr.size()
           // for no match condition
           assert arr.partitionPoint(0..<arr.size()) { it <= 0 } == 0
           // for no match condition with range
           assert arr.partitionPoint(2..<arr.size()) { it <= 0 } == 2

      Parameters:
        `self` - a groovy arr
        `range` - the range [l,r] to find data match the condition
        `condition` - the matching condition
      Returns:
        an integer that is the index of the first element of the second partition
      Since:
        5.0.0

    - #### public static int partitionPoint(char[] self, IntPredicate condition)

      Returns the index of the partition point according to the given predicate (the index of the first element of the second partition). The arr is assumed to be partitioned according to the given predicate.

           def arr = [7, 15, 3, 5, 4, 12, 6] as char[]
           assert arr.partitionPoint{ it%2 != 0 } == 4

           def arr = [1, 2, 3, 3, 4, 4, 5, 6, 7] as char[]
           // usage case like lower_bound(cpp), bisect_left(python)
           assert arr.partitionPoint{ it < 4 } == 4
           // usage case like upper_bound(cpp), bisect_right(python)
           assert arr.partitionPoint{ it <= 4 } == 6
           // for all match condition
           assert arr.partitionPoint{ it <= 100 } == arr.size()
           // for no match condition
           assert arr.partitionPoint{ it <= 0 } == 0

      Parameters:
        `self` - a groovy arr
        `condition` - the matching condition
      Returns:
        an integer that is the index of the first element of the second partition
      Since:
        5.0.0

    - #### public static int partitionPoint(short[] self, IntRange range, IntPredicate condition)

      Returns the index of the partition point according to the given predicate (the index of the first element of the second partition). The arr is assumed to be partitioned according to the given predicate.

           def arr = [7, 15, 3, 5, 4, 12, 6] as short[]
           assert arr.partitionPoint(0..<arr.size()) { it%2 != 0 } == 4

           def arr = [1, 2, 3, 3, 4, 4, 5, 6, 7] as short[]
           // usage case like lower_bound(cpp), bisect_left(python)
           assert arr.partitionPoint(0..<arr.size()) { it < 4 } == 4
           // usage case like upper_bound(cpp), bisect_right(python)
           assert arr.partitionPoint(0..<arr.size()) { it <= 4 } == 6
           // for all match condition
           assert arr.partitionPoint(0..<arr.size()) { it <= 100 } == arr.size()
           // for no match condition
           assert arr.partitionPoint(0..<arr.size()) { it <= 0 } == 0
           // for no match condition with range
           assert arr.partitionPoint(2..<arr.size()) { it <= 0 } == 2

      Parameters:
        `self` - a groovy arr
        `range` - the range [l,r] to find data match the condition
        `condition` - the matching condition
      Returns:
        an integer that is the index of the first element of the second partition
      Since:
        5.0.0

    - #### public static int partitionPoint(short[] self, IntPredicate condition)

      Returns the index of the partition point according to the given predicate (the index of the first element of the second partition). The arr is assumed to be partitioned according to the given predicate.

           def arr = [7, 15, 3, 5, 4, 12, 6] as short[]
           assert arr.partitionPoint{ it%2 != 0 } == 4

           def arr = [1, 2, 3, 3, 4, 4, 5, 6, 7] as short[]
           // usage case like lower_bound(cpp), bisect_left(python)
           assert arr.partitionPoint{ it < 4 } == 4
           // usage case like upper_bound(cpp), bisect_right(python)
           assert arr.partitionPoint{ it <= 4 } == 6
           // for all match condition
           assert arr.partitionPoint{ it <= 100 } == arr.size()
           // for no match condition
           assert arr.partitionPoint{ it <= 0 } == 0

      Parameters:
        `self` - a groovy arr
        `condition` - the matching condition
      Returns:
        an integer that is the index of the first element of the second partition
      Since:
        5.0.0

    - #### public static int partitionPoint(int[] self, IntRange range, IntPredicate condition)

      Returns the index of the partition point according to the given predicate (the index of the first element of the second partition). The arr is assumed to be partitioned according to the given predicate.

           def arr = [7, 15, 3, 5, 4, 12, 6] as int[]
           assert arr.partitionPoint(0..<arr.size()) { it%2 != 0 } == 4

           def arr = [1, 2, 3, 3, 4, 4, 5, 6, 7] as int[]
           // usage case like lower_bound(cpp), bisect_left(python)
           assert arr.partitionPoint(0..<arr.size()) { it < 4 } == 4
           // usage case like upper_bound(cpp), bisect_right(python)
           assert arr.partitionPoint(0..<arr.size()) { it <= 4 } == 6
           // for all match condition
           assert arr.partitionPoint(0..<arr.size()) { it <= 100 } == arr.size()
           // for all match condition
           assert arr.partitionPoint(0..<arr.size()) { it <= 0 } == 0
           // for no match condition with range
           assert arr.partitionPoint(2..<arr.size()) { it <= 0 } == 2

      Parameters:
        `self` - a groovy arr
        `range` - the range [l,r] to find data match the condition
        `condition` - the matching condition
      Returns:
        an integer that is the index of the first element of the second partition
      Since:
        5.0.0

    - #### public static int partitionPoint(int[] self, IntPredicate condition)

      Returns the index of the partition point according to the given predicate (the index of the first element of the second partition). The arr is assumed to be partitioned according to the given predicate.

           def arr = [7, 15, 3, 5, 4, 12, 6] as int[]
           assert arr.partitionPoint{ it%2 != 0 } == 4

           def arr = [1, 2, 3, 3, 4, 4, 5, 6, 7] as int[]
           // usage case like lower_bound(cpp), bisect_left(python)
           assert arr.partitionPoint{ it < 4 } == 4
           // usage case like upper_bound(cpp), bisect_right(python)
           assert arr.partitionPoint{ it <= 4 } == 6
           // for all match condition
           assert arr.partitionPoint{ it <= 100 } == arr.size()
           // for no match condition
           assert arr.partitionPoint{ it <= 0 } == 0

      Parameters:
        `self` - a groovy arr
        `condition` - the matching condition
      Returns:
        an integer that is the index of the first element of the second partition
      Since:
        5.0.0

    - #### public static int partitionPoint(long[] self, IntRange range, LongPredicate condition)

      Returns the index of the partition point according to the given predicate (the index of the first element of the second partition). The arr is assumed to be partitioned according to the given predicate.

           def arr = [7, 15, 3, 5, 4, 12, 6] as long[]
           assert arr.partitionPoint(0..<arr.size()) { it%2 != 0 } == 4

           def arr = [1, 2, 3, 3, 4, 4, 5, 6, 7] as long[]
           // usage case like lower_bound(cpp), bisect_left(python)
           assert arr.partitionPoint(0..<arr.size()) { it < 4 } == 4
           // usage case like upper_bound(cpp), bisect_right(python)
           assert arr.partitionPoint(0..<arr.size()) { it <= 4 } == 6
           // for all match condition
           assert arr.partitionPoint(0..<arr.size()) { it <= 100 } == arr.size()
           // for no match condition
           assert arr.partitionPoint(0..<arr.size()) { it <= 0 } == 0
           // for no match condition with range
           assert arr.partitionPoint(2..<arr.size()) { it <= 0 } == 2

      Parameters:
        `self` - a groovy arr
        `range` - the range [l,r] to find data match the condition
        `condition` - the matching condition
      Returns:
        an integer that is the index of the first element of the second partition
      Since:
        5.0.0

    - #### public static int partitionPoint(long[] self, LongPredicate condition)

      Returns the index of the partition point according to the given predicate (the index of the first element of the second partition). The arr is assumed to be partitioned according to the given predicate.

           def arr = [7, 15, 3, 5, 4, 12, 6] as long[]
           assert arr.partitionPoint{ it%2 != 0 } == 4

           def arr = [1, 2, 3, 3, 4, 4, 5, 6, 7] as long[]
           // usage case like lower_bound(cpp), bisect_left(python)
           assert arr.partitionPoint{ it < 4 } == 4
           // usage case like upper_bound(cpp), bisect_right(python)
           assert arr.partitionPoint{ it <= 4 } == 6
           // for all match condition
           assert arr.partitionPoint{ it <= 100 } == arr.size()
           // for no match condition
           assert arr.partitionPoint{ it <= 0 } == 0

      Parameters:
        `self` - a groovy arr
        `condition` - the matching condition
      Returns:
        an integer that is the index of the first element of the second partition
      Since:
        5.0.0

    - #### public static int partitionPoint(float[] self, IntRange range, DoublePredicate condition)

      Returns the index of the partition point according to the given predicate (the index of the first element of the second partition). The arr is assumed to be partitioned according to the given predicate.

           def arr = [7, 15, 3, 5, 4, 12, 6] as float[]
           assert arr.partitionPoint(0..<arr.size()) { it%2 != 0 } == 4

           def arr = [1, 2, 3, 3, 4, 4, 5, 6, 7] as float[]
           // usage case like lower_bound(cpp), bisect_left(python)
           assert arr.partitionPoint(0..<arr.size()) { it < 4 } == 4
           // usage case like upper_bound(cpp), bisect_right(python)
           assert arr.partitionPoint(0..<arr.size()) { it <= 4 } == 6
           // for all match condition
           assert arr.partitionPoint(0..<arr.size()) { it <= 100 } == arr.size()
           // for no match condition
           assert arr.partitionPoint(0..<arr.size()) { it <= 0 } == 0
           // for no match condition with range
           assert arr.partitionPoint(2..<arr.size()) { it <= 0 } == 2

      Parameters:
        `self` - a groovy arr
        `range` - the range [l,r] to find data match the condition
        `condition` - the matching condition
      Returns:
        an integer that is the index of the first element of the second partition
      Since:
        5.0.0

    - #### public static int partitionPoint(float[] self, DoublePredicate condition)

      Returns the index of the partition point according to the given predicate (the index of the first element of the second partition). The arr is assumed to be partitioned according to the given predicate.

           def arr = [7, 15, 3, 5, 4, 12, 6] as float[]
           assert arr.partitionPoint{ it%2 != 0 } == 4

           def arr = [1, 2, 3, 3, 4, 4, 5, 6, 7] as float[]
           // usage case like lower_bound(cpp), bisect_left(python)
           assert arr.partitionPoint{ it < 4 } == 4
           // usage case like upper_bound(cpp), bisect_right(python)
           assert arr.partitionPoint{ it <= 4 } == 6
           // for all match condition
           assert arr.partitionPoint{ it <= 100 } == arr.size()
           // for no match condition
           assert arr.partitionPoint{ it <= 0 } == 0

      Parameters:
        `self` - a groovy arr
        `condition` - the matching condition
      Returns:
        an integer that is the index of the first element of the second partition
      Since:
        5.0.0

    - #### public static int partitionPoint(double[] self, IntRange range, DoublePredicate condition)

      Returns the index of the partition point according to the given predicate (the index of the first element of the second partition). The arr is assumed to be partitioned according to the given predicate.

           def arr = [7, 15, 3, 5, 4, 12, 6] as double[]
           assert arr.partitionPoint(0..<arr.size()) { it%2 != 0 } == 4

           def arr = [1, 2, 3, 3, 4, 4, 5, 6, 7] as double[]
           // usage case like lower_bound(cpp), bisect_left(python)
           assert arr.partitionPoint(0..<arr.size()) { it < 4 } == 4
           // usage case like upper_bound(cpp), bisect_right(python)
           assert arr.partitionPoint(0..<arr.size()) { it <= 4 } == 6
           // for all match condition
           assert arr.partitionPoint(0..<arr.size()) { it <= 100 } == arr.size()
           // for all match condition
           assert arr.partitionPoint(0..<arr.size()) { it <= 0 } == 0
           // for no match condition with range
           assert arr.partitionPoint(2..<arr.size()) { it <= 0 } == 2

      Parameters:
        `self` - a groovy array
        `range` - the range [l,r] to find data match the condition
        `condition` - the matching condition
      Returns:
        an integer that is the index of the first element of the second partition
      Since:
        5.0.0

    - #### public static int partitionPoint(double[] self, DoublePredicate condition)

      Returns the index of the partition point according to the given predicate (the index of the first element of the second partition). The arr is assumed to be partitioned according to the given predicate.

           def arr = [7, 15, 3, 5, 4, 12, 6] as double[]
           assert arr.partitionPoint{ it%2 != 0 } == 4

           def arr = [1, 2, 3, 3, 4, 4, 5, 6, 7] as double[]
           // usage case like lower_bound(cpp), bisect_left(python)
           assert arr.partitionPoint{ it < 4 } == 4
           // usage case like upper_bound(cpp), bisect_right(python)
           assert arr.partitionPoint{ it <= 4 } == 6
           // for all match condition
           assert arr.partitionPoint{ it <= 100 } == arr.size()
           // for no match condition
           assert arr.partitionPoint{ it <= 0 } == 0

      Parameters:
        `self` - a groovy arr
        `condition` - the matching condition
      Returns:
        an integer that is the index of the first element of the second partition
      Since:
        5.0.0

    - #### <T> @SuppressWarnings("unchecked")
      public static T[] plus(T[] left, Collection<?> right)

      Creates an array containing elements from an original array plus those from a Collection.

           Integer[] a = [1, 2, 3]
           def result = a + [4, 5, 6]
           assert result.class == Integer[]
           assert result == new Integer[]{1, 2, 3, 4, 5, 6}

           Number[] c = [-1, 0.9, null]
           result = c + [1, 2, 3]
           assert result.class == Number[]
           assert result == new Number[]{-1, 0.9, null, 1, 2, 3}

           result = a + [-1, 0.9, null]
           assert result.class == Integer[]
           assert result == new Integer[]{1, 2, 3, -1, 0, null}

           // improper type arguments; Date can't be coerced to Integer
           groovy.test.GroovyAssert.shouldFail(ClassCastException) { a + [new Date()] }

      throws:
        ClassCastException if any elements from right aren't compatible (according to DefaultTypeTransformation.castToType) to the component type of left
      Parameters:
        `left` - the array
        `right` - a Collection to be appended
      Returns:
        A new array containing left with right appended to it.
      Since:
        1.8.7

    - #### <T> public static T[] plus(T[] left, Iterable<?> right)

      Creates an array containing elements from an original array plus those from an Iterable.

           class AbcIterable implements Iterable {
               Iterator iterator() { "abc".iterator() }
           }
           String[] array = ['x', 'y', 'z']
           def result = array + new AbcIterable()
           assert result.class == String[]
           assert result == new String[]{'x', 'y', 'z', 'a', 'b', 'c'}

      throws:
        ClassCastException if any elements from right aren't compatible (according to DefaultTypeTransformation.castToType) to the component type of left
      Parameters:
        `left` - the array
        `right` - an Iterable to be appended
      Returns:
        A new array containing elements from left with those from right appended.
      See Also:
        union(Object[], Iterable)
      Since:
        1.8.7

    - #### <T> @SuppressWarnings("unchecked")
      public static T[] plus(T[] left, Object[] right)

      Creates an array as a union of two arrays.

           Integer[] a = [1, 2, 3]
           Integer[] b = [4, 5, 6]
           def result = a + b
           assert result.class == Integer[]
           assert result == new Integer[]{1, 2, 3, 4, 5, 6}

           Number[] c = [-1, 0.9, null]
           result = c + a
           assert result.class == Number[]
           assert result == new Number[]{-1, 0.9, null, 1, 2, 3}

           result = a + c
           assert result.class == Integer[]
           assert result == new Integer[]{1, 2, 3, -1, 0, null}

           Date[] d = [new Date()]
           // improper type arguments; Date can't be coerced to Integer
           groovy.test.GroovyAssert.shouldFail(ClassCastException) { a + d }

      throws:
        ClassCastException if any elements from right aren't compatible (according to DefaultTypeTransformation.castToType) to the component type of left
      Parameters:
        `left` - the left Array
        `right` - the right Array
      Returns:
        A new array containing right appended to left.
      Since:
        1.8.7

    - #### <T> @SuppressWarnings("unchecked")
      public static T[] plus(T[] left, Object right)

      Creates an array containing elements from an original array plus an additional appended element.

           Integer[] a = [1, 2, 3]
           def result = a + 4
           assert result.class == Integer[]
           assert result == new Integer[]{1, 2, 3, 4}

           result = a + 5.5d
           assert result.class == Integer[]
           assert result == new Integer[]{1, 2, 3, 5}

           // improper type arguments; Date can't be coerced to Integer
           groovy.test.GroovyAssert.shouldFail(ClassCastException) { a + new Date() }

      throws:
        ClassCastException if any elements from right aren't compatible (according to DefaultTypeTransformation.castToType) to the component type of left
      Parameters:
        `left` - the array
        `right` - the value to append
      Returns:
        A new array containing left with right appended to it.
      Since:
        1.8.7

    - #### <T> public static void putAt(T[] self, IntRange range, T[] source)

      A helper method to allow arrays to be set with subscript operators.

           Integer[] from = [70, 80, 90]
           Integer[] nums = [1, 2, 3, 4, 5]
           nums[1..3] = from
           assert nums == [1, 70, 80, 90, 5]

      throws:
        IndexOutOfBoundsException if the source doesn't have sufficient elements or the IntRange is too big for the self array
      Parameters:
        `self` - an array
        `range` - the subset of the array to set
        `source` - the source array from which new values will come
      Since:
        5.0.0

    - #### <T> public static void putAt(T[] self, IntRange range, Iterable<T> source)

      A helper method to allow arrays to be set with subscript operators. Null will be used if the source iterable has insufficient elements.

           def from = [70, 80, 90]
           Integer[] nums = [1, 2, 3, 4, 5]
           nums[1..3] = from
           assert nums == [1, 70, 80, 90, 5]

      Parameters:
        `self` - an array
        `range` - the subset of the array to set
        `source` - the source array from which new values will come
      Since:
        5.0.0

    - #### public static void putAt(boolean[] self, IntRange range, boolean[] source)

      A helper method to allow arrays to be set with subscript operators.

           boolean[] from = [true, true, true]
           boolean[] to = [false, false, false, false, false]
           to[1..3] = from
           assert to == [false, true, true, true, false]

      throws:
        IndexOutOfBoundsException if the source doesn't have sufficient elements or the IntRange is too big for the self array
      Parameters:
        `self` - an array
        `range` - the subset of the array to set
        `source` - the source array from which new values will come
      Since:
        5.0.0

    - #### public static void putAt(boolean[] self, IntRange range, Iterable<Boolean> source)

      A helper method to allow arrays to be set with subscript operators. False will be used if the source iterable has insufficient elements.

           def from = [true, true, true]
           boolean[] to = [false, false, false, false, false]
           to[1..3] = from
           assert to == [false, true, true, true, false]

      Parameters:
        `self` - an array
        `range` - the subset of the array to set
        `source` - the source array from which new values will come
      Since:
        5.0.0

    - #### public static void putAt(byte[] self, IntRange range, byte[] source)

      A helper method to allow arrays to be set with subscript operators.

           byte[] from = [1, 1, 1]
           byte[] to = [0, 0, 0, 0, 0]
           to[1..3] = from
           assert to == [0, 1, 1, 1, 0]

      throws:
        IndexOutOfBoundsException if the source doesn't have sufficient elements or the IntRange is too big for the self array
      Parameters:
        `self` - an array
        `range` - the subset of the array to set
        `source` - the source array from which new values will come
      Since:
        5.0.0

    - #### public static void putAt(byte[] self, IntRange range, Iterable<Number> source)

      A helper method to allow arrays to be set with subscript operators. Zero will be used if the source iterable has insufficient elements.

           def from = [1, 1, 1]
           byte[] to = [0, 0, 0, 0, 0]
           to[1..3] = from
           assert to == [0, 1, 1, 1, 0]

      Parameters:
        `self` - an array
        `range` - the subset of the array to set
        `source` - the source array from which new values will come
      Since:
        5.0.0

    - #### public static void putAt(char[] self, IntRange range, char[] source)

      A helper method to allow arrays to be set with subscript operators.

           char[] from = 'XYZ'.chars
           char[] to = 'abcde'.chars
           to[1..3] = from
           assert to == 'aXYZe'.chars

      throws:
        IndexOutOfBoundsException if the source doesn't have sufficient elements or the IntRange is too big for the self array
      Parameters:
        `self` - an array
        `range` - the subset of the array to set
        `source` - the source array from which new values will come
      Since:
        5.0.0

    - #### public static void putAt(char[] self, IntRange range, Iterable<Character> source)

      A helper method to allow arrays to be set with subscript operators. The null character, \0, will be used if the source iterable has insufficient elements.

           def from = 'XYZ'.chars.toList()
           char[] to = 'abcde'.chars
           to[1..3] = from
           assert to == 'aXYZe'.chars

      Parameters:
        `self` - an array
        `range` - the subset of the array to set
        `source` - the source array from which new values will come
      Since:
        5.0.0

    - #### public static void putAt(short[] self, IntRange range, short[] source)

      A helper method to allow arrays to be set with subscript operators.

           short[] from = [1, 1, 1]
           short[] to = [0, 0, 0, 0, 0]
           to[1..3] = from
           assert to == [0, 1, 1, 1, 0]

      throws:
        IndexOutOfBoundsException if the source doesn't have sufficient elements or the IntRange is too big for the self array
      Parameters:
        `self` - an array
        `range` - the subset of the array to set
        `source` - the source array from which new values will come
      Since:
        5.0.0

    - #### public static void putAt(short[] self, IntRange range, Iterable<Number> source)

      A helper method to allow arrays to be set with subscript operators. Zero will be used if the source iterable has insufficient elements.

           def from = [1, 1, 1]
           short[] to = [0, 0, 0, 0, 0]
           to[1..3] = from
           assert to == [0, 1, 1, 1, 0]

      Parameters:
        `self` - an array
        `range` - the subset of the array to set
        `source` - the source array from which new values will come
      Since:
        5.0.0

    - #### public static void putAt(int[] self, IntRange range, int[] source)

      A helper method to allow arrays to be set with subscript operators.

           int[] from = [1, 1, 1]
           int[] to = [0, 0, 0, 0, 0]
           to[1..3] = from
           assert to == [0, 1, 1, 1, 0]

      throws:
        IndexOutOfBoundsException if the source doesn't have sufficient elements or the IntRange is too big for the self array
      Parameters:
        `self` - an array
        `range` - the subset of the array to set
        `source` - the source array from which new values will come
      Since:
        5.0.0

    - #### public static void putAt(int[] self, IntRange range, Iterable<Number> source)

      A helper method to allow arrays to be set with subscript operators. Zero will be used if the source iterable has insufficient elements.

           def from = [1, 1, 1]
           int[] to = [0, 0, 0, 0, 0]
           to[1..3] = from
           assert to == [0, 1, 1, 1, 0]

      Parameters:
        `self` - an array
        `range` - the subset of the array to set
        `source` - the source array from which new values will come
      Since:
        5.0.0

    - #### public static void putAt(long[] self, IntRange range, long[] source)

      A helper method to allow arrays to be set with subscript operators.

           long[] from = [1L, 1L, 1L]
           long[] to = [0L, 0L, 0L, 0L, 0L]
           to[1..3] = from
           assert to == [0L, 1L, 1L, 1L, 0L]

      throws:
        IndexOutOfBoundsException if the source doesn't have sufficient elements or the IntRange is too big for the self array
      Parameters:
        `self` - an array
        `range` - the subset of the array to set
        `source` - the source array from which new values will come
      Since:
        5.0.0

    - #### public static void putAt(long[] self, IntRange range, Iterable<Number> source)

      A helper method to allow arrays to be set with subscript operators. Zero will be used if the source iterable has insufficient elements.

           def from = [1L, 1L, 1L]
           long[] to = [0L, 0L, 0L, 0L, 0L]
           to[1..3] = from
           assert to == [0L, 1L, 1L, 1L, 0L]

      Parameters:
        `self` - an array
        `range` - the subset of the array to set
        `source` - the source array from which new values will come
      Since:
        5.0.0

    - #### public static void putAt(float[] self, IntRange range, float[] source)

      A helper method to allow arrays to be set with subscript operators.

           float[] from = [1f, 1f, 1f]
           float[] to = [0f, 0f, 0f, 0f, 0f]
           to[1..3] = from
           assert to == [0f, 1f, 1f, 1f, 0f]

      throws:
        IndexOutOfBoundsException if the source doesn't have sufficient elements or the IntRange is too big for the self array
      Parameters:
        `self` - an array
        `range` - the subset of the array to set
        `source` - the source array from which new values will come
      Since:
        5.0.0

    - #### public static void putAt(float[] self, IntRange range, Iterable<Number> source)

      A helper method to allow arrays to be set with subscript operators. Zero will be used if the source iterable has insufficient elements.

           def from = [1f, 1f, 1f]
           float[] to = [0f, 0f, 0f, 0f, 0f]
           to[1..3] = from
           assert to == [0f, 1f, 1f, 1f, 0f]

      Parameters:
        `self` - an array
        `range` - the subset of the array to set
        `source` - the source array from which new values will come
      Since:
        5.0.0

    - #### public static void putAt(double[] self, IntRange range, double[] source)

      A helper method to allow arrays to be set with subscript operators.

           double[] from = [1d, 1d, 1d]
           double[] to = [0d, 0d, 0d, 0d, 0d]
           to[1..3] = from
           assert to == [0d, 1d, 1d, 1d, 0d]

      throws:
        IndexOutOfBoundsException if the source doesn't have sufficient elements or the IntRange is too big for the self array
      Parameters:
        `self` - an array
        `range` - the subset of the array to set
        `source` - the source array from which new values will come
      Since:
        5.0.0

    - #### public static void putAt(double[] self, IntRange range, Iterable<Number> source)

      A helper method to allow arrays to be set with subscript operators. Zero will be used if the source iterable has insufficient elements.

           def from = [1d, 1d, 1d]
           double[] to = [0d, 0d, 0d, 0d, 0d]
           to[1..3] = from
           assert to == [0d, 1d, 1d, 1d, 0d]

      Parameters:
        `self` - an array
        `range` - the subset of the array to set
        `source` - the source array from which new values will come
      Since:
        5.0.0

    - #### public static boolean[] reverse(boolean[] self)

      Creates a new boolean array containing items which are the same as this array but in reverse order.

           boolean[] array = [false, true]
           assert array.reverse() == [true, false]

      Parameters:
        `self` - a boolean array
      Returns:
        an array containing the reversed items
      See Also:
        reverse(boolean[], boolean)
      Since:
        5.0.0

    - #### public static boolean[] reverse(boolean[] self, boolean mutate)

      Reverses the items in an array. If mutate is true, the original array is modified in place and returned. Otherwise, a new array containing the reversed items is produced.

           boolean[] array = [false, true, true]
           def yarra = array.reverse(true)
           assert array == [true, true, false]
           assert yarra == [true, true, false]
           assert array === yarra
           yarra = array.reverse(false)
           assert array !== yarra
           assert array == [true, true, false]
           assert yarra == [false, true, true]

      Parameters:
        `self` - a boolean array
        `mutate` - `true` if the array itself should be reversed in place, `false` if a new array should be created
      Returns:
        an array containing the reversed items
      Since:
        5.0.0

    - #### public static byte[] reverse(byte[] self)

      Creates a new byte array containing items which are the same as this array but in reverse order.

           byte[] array = 1..2
           assert array.reverse() == 2..1

      Parameters:
        `self` - a byte array
      Returns:
        an array containing the reversed items
      See Also:
        reverse(byte[], boolean)
      Since:
        5.0.0

    - #### public static byte[] reverse(byte[] self, boolean mutate)

      Reverses the items in an array. If mutate is true, the original array is modified in place and returned. Otherwise, a new array containing the reversed items is produced.

           byte[] array = 1..3
           def yarra = array.reverse(true)
           assert array == 3..1
           assert yarra == 3..1
           assert array === yarra
           yarra = array.reverse(false)
           assert array !== yarra
           assert array == 3..1
           assert yarra == 1..3

      Parameters:
        `self` - a byte array
        `mutate` - `true` if the array itself should be reversed in place, `false` if a new array should be created
      Returns:
        an array containing the reversed items
      Since:
        5.0.0

    - #### public static char[] reverse(char[] self)

      Creates a new char array containing items which are the same as this array but in reverse order.

           char[] array = ['a', 'b']
           assert array.reverse() == ['b', 'a'] as char[]

      Parameters:
        `self` - a char array
      Returns:
        an array containing the reversed items
      See Also:
        reverse(char[], boolean)
      Since:
        5.0.0

    - #### public static char[] reverse(char[] self, boolean mutate)

      Reverses the items in an array. If mutate is true, the original array is modified in place and returned. Otherwise, a new array containing the reversed items is produced.

           char[] array = ['a', 'b', 'c']
           def yarra = array.reverse(true)
           assert array == ['c', 'b', 'a']
           assert yarra == ['c', 'b', 'a']
           assert array === yarra
           yarra = array.reverse(false)
           assert array !== yarra
           assert array == ['c', 'b', 'a']
           assert yarra == ['a', 'b', 'c']

      Parameters:
        `self` - a char array
        `mutate` - `true` if the array itself should be reversed in place, `false` if a new array should be created
      Returns:
        an array containing the reversed items
      Since:
        5.0.0

    - #### public static short[] reverse(short[] self)

      Creates a new short array containing items which are the same as this array but in reverse order.

           short[] array = 1..2
           assert array.reverse() == 2..1

      Parameters:
        `self` - a short array
      Returns:
        an array containing the reversed items
      See Also:
        reverse(short[], boolean)
      Since:
        5.0.0

    - #### public static short[] reverse(short[] self, boolean mutate)

      Reverses the items in an array. If mutate is true, the original array is modified in place and returned. Otherwise, a new array containing the reversed items is produced.

           short[] array = 1..3
           def yarra = array.reverse(true)
           assert array == 3..1
           assert yarra == 3..1
           assert array === yarra
           yarra = array.reverse(false)
           assert array !== yarra
           assert array == 3..1
           assert yarra == 1..3

      Parameters:
        `self` - a short array
        `mutate` - `true` if the array itself should be reversed in place, `false` if a new array should be created
      Returns:
        an array containing the reversed items
      Since:
        5.0.0

    - #### public static int[] reverse(int[] self)

      Creates a new int array containing items which are the same as this array but in reverse order.

           int[] array = 1..2
           assert array.reverse() == 2..1

      Parameters:
        `self` - an int array
      Returns:
        an array containing the reversed items
      See Also:
        reverse(int[], boolean)
      Since:
        5.0.0

    - #### public static int[] reverse(int[] self, boolean mutate)

      Reverses the items in an array. If mutate is true, the original array is modified in place and returned. Otherwise, a new array containing the reversed items is produced.

           int[] array = 1..3
           def yarra = array.reverse(true)
           assert array == 3..1
           assert yarra == 3..1
           assert array === yarra
           yarra = array.reverse(false)
           assert array !== yarra
           assert array == 3..1
           assert yarra == 1..3

      Parameters:
        `self` - an int array
        `mutate` - `true` if the array itself should be reversed in place, `false` if a new array should be created
      Returns:
        an array containing the reversed items
      Since:
        5.0.0

    - #### public static long[] reverse(long[] self)

      Creates a new long array containing items which are the same as this array but in reverse order.

           long[] array = 1L..2L
           assert array.reverse() == 2L..1L

      Parameters:
        `self` - a long array
      Returns:
        an array containing the reversed items
      See Also:
        reverse(long[], boolean)
      Since:
        5.0.0

    - #### public static long[] reverse(long[] self, boolean mutate)

      Reverses the items in an array. If mutate is true, the original array is modified in place and returned. Otherwise, a new array containing the reversed items is produced.

           long[] array = 1L..3L
           def yarra = array.reverse(true)
           assert array == 3L..1L
           assert yarra == 3L..1L
           assert array === yarra
           yarra = array.reverse(false)
           assert array !== yarra
           assert array == 3L..1L
           assert yarra == 1L..3L

      Parameters:
        `self` - a long array
        `mutate` - `true` if the array itself should be reversed in place, `false` if a new array should be created
      Returns:
        an array containing the reversed items
      Since:
        5.0.0

    - #### public static float[] reverse(float[] self)

      Creates a new float array containing items which are the same as this array but in reverse order.

           float[] array = [1f, 2f]
           assert array.reverse() == [2f, 1f]

      Parameters:
        `self` - a float array
      Returns:
        an array containing the reversed items
      See Also:
        reverse(float[], boolean)
      Since:
        5.0.0

    - #### public static float[] reverse(float[] self, boolean mutate)

      Reverses the items in an array. If mutate is true, the original array is modified in place and returned. Otherwise, a new array containing the reversed items is produced.

           float[] array = 1f..3f
           def yarra = array.reverse(true)
           assert array == 3f..1f
           assert yarra == 3f..1f
           assert array === yarra
           yarra = array.reverse(false)
           assert array !== yarra
           assert array == 3f..1f
           assert yarra == 1f..3f

      Parameters:
        `self` - a float array
        `mutate` - `true` if the array itself should be reversed in place, `false` if a new array should be created
      Returns:
        an array containing the reversed items
      Since:
        5.0.0

    - #### public static double[] reverse(double[] self)

      Creates a new double array containing items which are the same as this array but in reverse order.

           double[] array = [1d, 2d]
           assert array.reverse() == [2d, 1d]

      Parameters:
        `self` - a double array
      Returns:
        an array containing the reversed items
      See Also:
        reverse(double[], boolean)
      Since:
        5.0.0

    - #### public static double[] reverse(double[] self, boolean mutate)

      Reverses the items in an array. If mutate is true, the original array is modified in place and returned. Otherwise, a new array containing the reversed items is produced.

           double[] array = 1d..3d
           def yarra = array.reverse(true)
           assert array == 3d..1d
           assert yarra == 3d..1d
           assert array === yarra
           yarra = array.reverse(false)
           assert array !== yarra
           assert array == 3d..1d
           assert yarra == 1d..3d

      Parameters:
        `self` - a double array
        `mutate` - `true` if the array itself should be reversed in place, `false` if a new array should be created
      Returns:
        an array containing the reversed items
      Since:
        5.0.0

    - #### <T> public static T[] reverse(T[] self)

      Creates a new array containing items which are the same as this array but in reverse order.

      Parameters:
        `self` - an array
      Returns:
        An array containing the reversed items.
      See Also:
        reverse(Object[], boolean)
      Since:
        1.5.5

    - #### <T> public static T[] reverse(T[] self, boolean mutate)

      Reverses the items in an array. If mutate is true, the original array is modified in place and returned. Otherwise, a new array containing the reversed items is produced.

           def array = new Object[] {1,2,3}
           def yarra = array.reverse(true)
           assert array == 3..1
           assert yarra == 3..1

           yarra = array.reverse(false)
           assert array == 3..1
           assert yarra == 1..3

      Parameters:
        `self` - an array
        `mutate` - `true` if the array itself should be reversed in place, `false` if a new array should be created
      Returns:
        An array containing the reversed items.
      Since:
        1.8.1

    - #### public static boolean[] reverseEach(boolean[] self, @ClosureParams(FirstParam.Component.class)
      Closure<?> closure)

      Iterates through a boolean[] in reverse order passing each boolean to the given closure.

           boolean[] array = [false, true, true]
           String result = ''
           array.reverseEach{ result += it }
           assert result == 'truetruefalse'

      Parameters:
        `self` - the boolean array over which we iterate
        `closure` - the closure applied on each boolean
      Returns:
        the self array
      Since:
        5.0.0

    - #### public static byte[] reverseEach(byte[] self, @ClosureParams(FirstParam.Component.class)
      Closure<?> closure)

      Iterates through a byte[] in reverse order passing each byte to the given closure.

           byte[] array = [0, 1, 2]
           String result = ''
           array.reverseEach{ result += it }
           assert result == '210'

      Parameters:
        `self` - the byte array over which we iterate
        `closure` - the closure applied on each byte
      Returns:
        the self array
      Since:
        5.0.0

    - #### public static char[] reverseEach(char[] self, @ClosureParams(FirstParam.Component.class)
      Closure<?> closure)

      Iterates through a char[] in reverse order passing each char to the given closure.

           char[] array = 'abc'.chars
           String result = ''
           array.reverseEach{ result += it }
           assert result == 'cba'

      Parameters:
        `self` - the char array over which we iterate
        `closure` - the closure applied on each char
      Returns:
        the self array
      Since:
        5.0.0

    - #### public static short[] reverseEach(short[] self, @ClosureParams(FirstParam.Component.class)
      Closure<?> closure)

      Iterates through a short[] in reverse order passing each short to the given closure.

           short[] array = [0, 1, 2]
           String result = ''
           array.reverseEach{ result += it }
           assert result == '210'

      Parameters:
        `self` - the short array over which we iterate
        `closure` - the closure applied on each short
      Returns:
        the self array
      Since:
        5.0.0

    - #### public static int[] reverseEach(int[] self, @ClosureParams(FirstParam.Component.class)
      Closure<?> closure)

      Iterates through an int[] in reverse order passing each int to the given closure.

           int[] array = [0, 1, 2]
           String result = ''
           array.reverseEach{ result += it }
           assert result == '210'

      Parameters:
        `self` - the int array over which we iterate
        `closure` - the closure applied on each int
      Returns:
        the self array
      Since:
        5.0.0

    - #### public static long[] reverseEach(long[] self, @ClosureParams(FirstParam.Component.class)
      Closure<?> closure)

      Iterates through a long[] in reverse order passing each long to the given closure.

           long[] array = [0, 1, 2]
           String result = ''
           array.reverseEach{ result += it }
           assert result == '210'

      Parameters:
        `self` - the long array over which we iterate
        `closure` - the closure applied on each long
      Returns:
        the self array
      Since:
        5.0.0

    - #### public static float[] reverseEach(float[] self, @ClosureParams(FirstParam.Component.class)
      Closure<?> closure)

      Iterates through a float[] in reverse order passing each float to the given closure.

           float[] array = [0, 1, 2]
           String result = ''
           array.reverseEach{ result += it }
           assert result == '2.01.00.0'

      Parameters:
        `self` - the float array over which we iterate
        `closure` - the closure applied on each float
      Returns:
        the self array
      Since:
        5.0.0

    - #### public static double[] reverseEach(double[] self, @ClosureParams(FirstParam.Component.class)
      Closure<?> closure)

      Iterates through a double[] in reverse order passing each double to the given closure.

           double[] array = [0, 1, 2]
           String result = ''
           array.reverseEach{ result += it }
           assert result == '2.01.00.0'

      Parameters:
        `self` - the double array over which we iterate
        `closure` - the closure applied on each double
      Returns:
        the self array
      Since:
        5.0.0

    - #### <T> public static T[] reverseEach(T[] self, @ClosureParams(FirstParam.Component.class)
      Closure<?> closure)

      Iterates over each element of the array in the reverse order.

      Parameters:
        `self` - an array
        `closure` - a closure to which each item is passed
      Returns:
        the original array
      Since:
        1.5.2

    - #### <T> public static void shuffle(T[] self)

      Randomly reorders the elements of the specified array.

           Integer[] array = [10, 5, 20]
           def origSize = array.size()
           def items = array.toList()
           array.shuffle()
           assert array.size() == origSize
           assert items.every{ array.contains(it) }

      Parameters:
        `self` - an array
      Since:
        3.0.0

    - #### <T> public static void shuffle(T[] self, Random rnd)

      Randomly reorders the elements of the specified array using the specified random instance as the source of randomness.

           def r = new Random()
           Integer[] array = [10, 5, 20]
           def origSize = array.size()
           def items = array.toList()
           array.shuffle(r)
           assert array.size() == origSize
           assert items.every{ array.contains(it) }

      Parameters:
        `self` - an array
      Since:
        3.0.0

    - #### <T> public static T[] shuffled(T[] self)

      Creates a new array containing the elements of the specified array but in a random order.

           Integer[] array = [10, 5, 20]
           def result = array.shuffled()
           assert array !== result
           assert array.length == result.length
           assert array.every{ result.contains(it) }
           assert array == new Integer[] {10, 5, 20}

      Parameters:
        `self` - an array
      Returns:
        the shuffled array
      Since:
        3.0.0

    - #### <T> public static T[] shuffled(T[] self, Random rnd)

      Creates a new array containing the elements of the specified array but in a random order using the specified random instance as the source of randomness.

           def r = new Random()
           Integer[] array = [10, 5, 20]
           def result = array.shuffled(r)
           assert array !== result
           assert array.length == result.length
           assert array.every{ result.contains(it) }
           assert array == new Integer[] {10, 5, 20}

      Parameters:
        `self` - an array
      Returns:
        the shuffled array
      Since:
        3.0.0

    - #### public static int size(boolean[] self)

      Provides arrays with a `size` method similar to collections.

           boolean[] array = [true, false, true]
           assert array.size() == 3

      Parameters:
        `self` - a boolean array
      Returns:
        the length of the array
      Since:
        1.5.0

    - #### public static int size(byte[] self)

      Provides arrays with a `size` method similar to collections.

      Parameters:
        `self` - a byte array
      Returns:
        the length of the array
      Since:
        1.0

    - #### public static int size(char[] self)

      Provides arrays with a `size` method similar to collections.

      Parameters:
        `self` - a char array
      Returns:
        the length of the array
      Since:
        1.0

    - #### public static int size(short[] self)

      Provides arrays with a `size` method similar to collections.

      Parameters:
        `self` - a short array
      Returns:
        the length of the array
      Since:
        1.0

    - #### public static int size(int[] self)

      Provides arrays with a `size` method similar to collections.

      Parameters:
        `self` - an int array
      Returns:
        the length of the array
      Since:
        1.0

    - #### public static int size(long[] self)

      Provides arrays with a `size` method similar to collections.

      Parameters:
        `self` - a long array
      Returns:
        the length of the array
      Since:
        1.0

    - #### public static int size(float[] self)

      Provides arrays with a `size` method similar to collections.

      Parameters:
        `self` - a float array
      Returns:
        the length of the array
      Since:
        1.0

    - #### public static int size(double[] self)

      Provides arrays with a `size` method similar to collections.

      Parameters:
        `self` - a double array
      Returns:
        the length of the array
      Since:
        1.0

    - #### public static int size(Object[] self)

      Provides the standard Groovy `size()` method for an array.

      Parameters:
        `self` - an object array
      Returns:
        the length of the array
      Since:
        1.0

    - #### <T> public static T[] sort(T[] self)

      Modifies this array so that its elements are in sorted order. The array items are assumed to be comparable.

      Parameters:
        `self` - the array to be sorted
      Returns:
        the sorted array
      Since:
        1.5.5

    - #### <T> public static T[] sort(T[] self, boolean mutate)

      Sorts the given array into sorted order. The array items are assumed to be comparable. If mutate is true, the array is sorted in place and returned. Otherwise, a new sorted array is returned and the original array remains unchanged.

           def orig = ["hello","hi","Hey"] as String[]
           def sorted = orig.sort(false)
           assert orig == ["hello","hi","Hey"] as String[]
           assert sorted == ["Hey","hello","hi"] as String[]
           orig.sort(true)
           assert orig == ["Hey","hello","hi"] as String[]

      Parameters:
        `self` - the array to be sorted
        `mutate` - false will always cause a new array to be created, true will mutate the array in place
      Returns:
        the sorted array
      Since:
        1.8.1

    - #### <T> public static T[] sort(T[] self, Comparator<? super T> comparator)

      Sorts the given array into sorted order using the given comparator.

      Parameters:
        `self` - the array to be sorted
        `comparator` - a Comparator used for the comparison
      Returns:
        the sorted array
      Since:
        1.5.5

    - #### <T> public static T[] sort(T[] self, boolean mutate, Comparator<? super T> comparator)

      Sorts the elements from this array into sorted order as determined by the given comparator. If mutate is true, the array is sorted in place and returned. Otherwise, a new sorted array is returned and the original array remains unchanged.

           def orig = ["hello","hi","Hey"] as String[]
           def sorted = orig.sort(false, String.CASE_INSENSITIVE_ORDER)
           assert orig == ["hello","hi","Hey"] as String[]
           assert sorted == ["hello","Hey","hi"] as String[]
           orig.sort(true, String.CASE_INSENSITIVE_ORDER)
           assert orig == ["hello","Hey","hi"] as String[]

      Parameters:
        `self` - the array containing elements to be sorted
        `mutate` - false will always cause a new array to be created, true will mutate arrays in place
        `comparator` - a Comparator used for the comparison
      Returns:
        a sorted array
      Since:
        1.8.1

    - #### <T> public static T[] sort(T[] self, @ClosureParams(value=FromString.class,options={"T","T,T"})
      Closure<?> closure)

      Sorts the elements from this array into a newly created array using the Closure to determine the correct ordering.

      If the closure has two parameters it is used like a traditional Comparator. I.e. it should compare its two parameters for order, returning a negative integer, zero, or a positive integer when the first parameter is less than, equal to, or greater than the second respectively. Otherwise, the Closure is assumed to take a single parameter and return a Comparable (typically an Integer) which is then used for further comparison.

      Parameters:
        `self` - the array containing the elements to be sorted
        `closure` - a Closure used to determine the correct ordering
      Returns:
        the sorted array
      Since:
        1.5.5

    - #### <T> public static T[] sort(T[] self, IntRange range, @ClosureParams(value=FromString.class,options={"T","T,T"})
      Closure<?> closure)

      Sorts the elements from this array with index values in the given index range into a newly created array using the Closure to determine the correct ordering.

      If the closure has two parameters it is used like a traditional Comparator. I.e. it should compare its two parameters for order, returning a negative integer, zero, or a positive integer when the first parameter is less than, equal to, or greater than the second respectively. Otherwise, the Closure is assumed to take a single parameter and return a Comparable (typically an Integer) which is then used for further comparison.

      Parameters:
        `self` - the array containing the elements to be sorted
        `closure` - a Closure used to determine the correct ordering
      Returns:
        the sorted array
      Since:
        5.0.0

    - #### <T> public static T[] sort(T[] self, boolean mutate, @ClosureParams(value=FromString.class,options={"T","T,T"})
      Closure<?> closure)

      Sorts the elements from this array into sorted order using the Closure to determine the correct ordering. If mutate is false, a new array is returned and the original array remains unchanged. Otherwise, the original array is sorted in place and returned.

      If the closure has two parameters it is used like a traditional Comparator. I.e. it should compare its two parameters for order, returning a negative integer, zero, or a positive integer when the first parameter is less than, equal to, or greater than the second respectively. Otherwise, the Closure is assumed to take a single parameter and return a Comparable (typically an Integer) which is then used for further comparison.

           def orig = ["hello","hi","Hey"] as String[]
           def sorted = orig.sort(false) { it.size() }
           assert orig == ["hello","hi","Hey"] as String[]
           assert sorted == ["hi","Hey","hello"] as String[]
           orig.sort(true) { it.size() }
           assert orig == ["hi","Hey","hello"] as String[]

      Parameters:
        `self` - the array to be sorted
        `mutate` - false causes a new array to be created, true will mutate arrays in place
        `closure` - a Closure used to determine the correct ordering
      Returns:
        the sorted array
      Since:
        1.8.1

    - #### <T> public static T[] sort(T[] self, IntRange range, boolean mutate, @ClosureParams(value=FromString.class,options={"T","T,T"})
      Closure<?> closure)

      Sorts the elements with index values in the given index range into sorted order using the Closure to determine the correct ordering. If mutate is false, a new array is returned and the original array remains unchanged. Otherwise, the original array is sorted in place and returned.

      If the closure has two parameters it is used like a traditional Comparator. I.e. it should compare its two parameters for order, returning a negative integer, zero, or a positive integer when the first parameter is less than, equal to, or greater than the second respectively. Otherwise, the Closure is assumed to take a single parameter and return a Comparable (typically an Integer) which is then used for further comparison.

           // an array with some odd then even numbers
           Integer[] nums = [5, 9, 1, 7, 3, 4, 8, 6, 0, 2]

           // sort odds ascending, evens descending
           assert nums.sort(0..4, false) { it }.sort(5..9, false) { -it }
            == [1, 3, 5, 7, 9, 8, 6, 4, 2, 0]
           // sort odds descending, evens descending
           assert nums.sort(0..<5, false) { -it }.sort(4<..<10, false) { -it }
            == [9, 7, 5, 3, 1, 8, 6, 4, 2, 0]
           // sort odds descending, evens ascending
           assert nums.sort(0..<5, false) { -it }.sort(5..-1, false) { it }
            == [9, 7, 5, 3, 1, 0, 2, 4, 6, 8]
           // leave first and last numbers, sort remaining odds ascending, remaining evens descending
           assert nums.sort(1..4, false) { it }.sort(5..-2, false) { -it }
            == [5, 1, 3, 7, 9, 8, 6, 4, 0, 2]
           // leave first and last numbers, sort remaining odds descending, remaining evens ascending
           assert nums.sort(1..4, false) { -it }.sort(5..-2, false) { it }
            == [5, 9, 7, 3, 1, 0, 4, 6, 8, 2]
           // leave first and last odds and evens, sort remaining odds ascending, remaining evens descending
           assert nums.sort(0<..<4, false) { it }.sort(5<..<9, false) { -it }
            == [5, 1, 7, 9, 3, 4, 8, 6, 0, 2]
           // leave first and last odds and evens, sort remaining odds descending, remaining evens ascending
           assert nums.sort(0<..<4, false) { -it }.sort(5<..<-1, false) { it }
            == [5, 9, 7, 1, 3, 4, 0, 6, 8, 2]

      Parameters:
        `self` - the array to be sorted
        `range` - the inclusive range of index values over which to sort
        `mutate` - false causes a new array to be created, true will mutate arrays in place
        `closure` - a Closure used to determine the correct ordering
      Returns:
        the sorted array
      Since:
        5.0.0

    - #### <T> public static Collection<Collection<T>> split(T[] self, @ClosureParams(FirstParam.Component.class)
      Closure<?> closure)

      Splits all items into two collections based on the closure condition. The first list contains all items which match the closure expression. The second list all those that don't.

      Parameters:
        `self` - an Array
        `closure` - a closure condition
      Returns:
        a List whose first item is the accepted values and whose second item is the rejected values
      Since:
        2.5.0

    - #### public static byte sum(byte[] self)

      Sums the items in an array.

          assert (1+2+3+4 as byte) == ([1,2,3,4] as byte[]).sum()

      Parameters:
        `self` - The array of values to add together
      Returns:
        The sum of all the items
      Since:
        2.4.2

    - #### public static char sum(char[] self)

      Sums the items in an array.

          assert (1+2+3+4 as char) == ([1,2,3,4] as char[]).sum()

      Parameters:
        `self` - The array of values to add together
      Returns:
        The sum of all the items
      Since:
        2.4.2

    - #### public static short sum(short[] self)

      Sums the items in an array.

          assert (1+2+3+4 as short) == ([1,2,3,4] as short[]).sum()

      Parameters:
        `self` - The array of values to add together
      Returns:
        The sum of all the items
      Since:
        2.4.2

    - #### public static int sum(int[] self)

      Sums the items in an array.

          assert 1+2+3+4 == ([1,2,3,4] as int[]).sum()

      Parameters:
        `self` - The array of values to add together
      Returns:
        The sum of all the items
      Since:
        2.4.2

    - #### @Incubating
      public static int sum(int[] self, IntUnaryOperator operator)

      Calculates the sum of values found from applying the operator to members of the int array.

           int[] nums = [10, -20, 30]
           assert 20 == nums.sum{ n -> n }
           assert 60 == nums.sum{ n -> n.abs() }
           int[] squares = [1, 4, 9]
           assert squares.sum(java.util.function.IntUnaryOperator.identity()) == 14
           assert squares.sum(Math::sqrt) == 6

      throws:
        UnsupportedOperationException if the array is empty
      Parameters:
        `self` - an int array
        `operator` - an operator that returns an int used for summing values
      Returns:
        the sum value of all values after applying the operator
      Since:
        5.0.0

    - #### public static long sum(long[] self)

      Sums the items in an array.

          assert (1+2+3+4 as long) == ([1,2,3,4] as long[]).sum()

      Parameters:
        `self` - The array of values to add together
      Returns:
        The sum of all the items
      Since:
        2.4.2

    - #### @Incubating
      public static long sum(long[] self, LongUnaryOperator operator)

      Calculates the sum of values found from applying the operator to members of the int array.

           int[] nums = [10, -20, 30]
           assert 20 == nums.sum{ n -> n }
           assert 60 == nums.sum{ n -> n.abs() }

      throws:
        UnsupportedOperationException if the array is empty
      Parameters:
        `self` - a long array
        `operator` - an operator that returns a long used for summing values
      Returns:
        the sum value of all values after applying the operator
      Since:
        5.0.0

    - #### public static float sum(float[] self)

      Sums the items in an array.

          assert (1+2+3+4 as float) == ([1,2,3,4] as float[]).sum()

      Parameters:
        `self` - The array of values to add together
      Returns:
        The sum of all the items
      Since:
        2.4.2

    - #### @Incubating
      public static float sum(float[] self, FloatUnaryOperator operator)

      Calculates the sum of values found from applying the operator to members of the float array.

           float[] nums = [10f, -20f, 30f]
           assert 20f == nums.sum{ n -> n }
           assert 60f == nums.sum{ n -> n.abs() }

      throws:
        UnsupportedOperationException if the array is empty
      Parameters:
        `self` - a float array
        `operator` - an operator that returns a float used for summing values
      Returns:
        the sum value of all values after applying the operator
      Since:
        5.0.0

    - #### public static double sum(double[] self)

      Sums the items in an array.

          assert (1+2+3+4 as double) == ([1,2,3,4] as double[]).sum()

      Parameters:
        `self` - The array of values to add together
      Returns:
        The sum of all the items
      Since:
        2.4.2

    - #### @Incubating
      public static double sum(double[] self, DoubleUnaryOperator operator)

      Calculates the sum of values found from applying the operator to members of the int array.

           int[] nums = [10, -20, 30]
           assert 20 == nums.sum{ n -> n }
           assert 60 == nums.sum{ n -> n.abs() }

      throws:
        UnsupportedOperationException if the array is empty
      Parameters:
        `self` - a double array
        `operator` - an operator that returns a double used for summing values
      Returns:
        the sum value of all values after applying the operator
      Since:
        5.0.0

    - #### public static Object sum(Object[] self)

      Sums the items in an array. This is equivalent to invoking the "plus" method on all items in the array.

      Parameters:
        `self` - The array of values to add together
      Returns:
        The sum of all the items
      See Also:
        DefaultGroovyMethods.sum
      Since:
        1.7.1

    - #### public static byte sum(byte[] self, byte initialValue)

      Sums the items in an array, adding the result to some initial value.

          assert (5+1+2+3+4 as byte) == ([1,2,3,4] as byte[]).sum(5 as byte)

      Parameters:
        `self` - an array of values to sum
        `initialValue` - the items in the array will be summed to this initial value
      Returns:
        The sum of all the items.
      Since:
        2.4.2

    - #### public static char sum(char[] self, char initialValue)

      Sums the items in an array, adding the result to some initial value.

          assert (5+1+2+3+4 as char) == ([1,2,3,4] as char[]).sum(5 as char)

      Parameters:
        `self` - an array of values to sum
        `initialValue` - the items in the array will be summed to this initial value
      Returns:
        The sum of all the items.
      Since:
        2.4.2

    - #### public static short sum(short[] self, short initialValue)

      Sums the items in an array, adding the result to some initial value.

          assert (5+1+2+3+4 as short) == ([1,2,3,4] as short[]).sum(5 as short)

      Parameters:
        `self` - an array of values to sum
        `initialValue` - the items in the array will be summed to this initial value
      Returns:
        The sum of all the items.
      Since:
        2.4.2

    - #### public static int sum(int[] self, int initialValue)

      Sums the items in an array, adding the result to some initial value.

          assert 5+1+2+3+4 == ([1,2,3,4] as int[]).sum(5)

      Parameters:
        `self` - an array of values to sum
        `initialValue` - the items in the array will be summed to this initial value
      Returns:
        The sum of all the items.
      Since:
        2.4.2

    - #### public static long sum(long[] self, long initialValue)

      Sums the items in an array, adding the result to some initial value.

          assert (5+1+2+3+4 as long) == ([1,2,3,4] as long[]).sum(5)

      Parameters:
        `self` - an array of values to sum
        `initialValue` - the items in the array will be summed to this initial value
      Returns:
        The sum of all the items.
      Since:
        2.4.2

    - #### public static float sum(float[] self, float initialValue)

      Sums the items in an array, adding the result to some initial value.

          assert (5+1+2+3+4 as float) == ([1,2,3,4] as float[]).sum(5)

      Parameters:
        `self` - an array of values to sum
        `initialValue` - the items in the array will be summed to this initial value
      Returns:
        The sum of all the items.
      Since:
        2.4.2

    - #### public static double sum(double[] self, double initialValue)

      Sums the items in an array, adding the result to some initial value.

          assert (5+1+2+3+4 as double) == ([1,2,3,4] as double[]).sum(5)

      Parameters:
        `self` - an array of values to sum
        `initialValue` - the items in the array will be summed to this initial value
      Returns:
        The sum of all the items.
      Since:
        2.4.2

    - #### public static Object sum(Object[] self, Object initialValue)

      Sums the items in an array, adding the result to some initial value.

      Parameters:
        `self` - an array of values to sum
        `initialValue` - the items in the array will be summed to this initial value
      Returns:
        The sum of all the items.
      Since:
        1.7.1

    - #### <T> public static Object sum(T[] self, @ClosureParams(FirstParam.Component.class)
      Closure<?> closure)

      Sums the result of applying a closure to each item of an array. `array.sum(closure)` is equivalent to: `array.collect(closure).sum()`.

      Parameters:
        `self` - An array
        `closure` - a single parameter closure that returns a (typically) numeric value.
      Returns:
        The sum of the values returned by applying the closure to each item of the array.
      Since:
        1.7.1

    - #### <T> public static Object sum(T[] self, Object initialValue, @ClosureParams(FirstParam.Component.class)
      Closure<?> closure)

      Sums the result of applying a closure to each item of an array to some initial value. `array.sum(initVal, closure)` is equivalent to: `array.collect(closure).sum(initVal)`.

      Parameters:
        `self` - an array
        `closure` - a single parameter closure that returns a (typically) numeric value.
        `initialValue` - the closure results will be summed to this initial value
      Returns:
        The sum of the values returned by applying the closure to each item of the array.
      Since:
        1.7.1

    - #### public static boolean[] swap(boolean[] self, int i, int j)

      Swaps two elements at the specified positions.

      Example:

           assert ([false, true, false, true] as boolean[]) == ([false, false, true, true] as boolean[]).swap(1, 2)

      Parameters:
        `self` - a boolean array
        `i` - a position
        `j` - a position
      Returns:
        self
      Since:
        2.4.0

    - #### public static byte[] swap(byte[] self, int i, int j)

      Swaps two elements at the specified positions.

      Example:

           assert ([1, 3, 2, 4] as byte[]) == ([1, 2, 3, 4] as byte[]).swap(1, 2)

      Parameters:
        `self` - a boolean array
        `i` - a position
        `j` - a position
      Returns:
        self
      Since:
        2.4.0

    - #### public static char[] swap(char[] self, int i, int j)

      Swaps two elements at the specified positions.

      Example:

           assert ([1, 3, 2, 4] as char[]) == ([1, 2, 3, 4] as char[]).swap(1, 2)

      Parameters:
        `self` - a boolean array
        `i` - a position
        `j` - a position
      Returns:
        self
      Since:
        2.4.0

    - #### public static short[] swap(short[] self, int i, int j)

      Swaps two elements at the specified positions.

      Example:

           assert ([1, 3, 2, 4] as short[]) == ([1, 2, 3, 4] as short[]).swap(1, 2)

      Parameters:
        `self` - a boolean array
        `i` - a position
        `j` - a position
      Returns:
        self
      Since:
        2.4.0

    - #### public static int[] swap(int[] self, int i, int j)

      Swaps two elements at the specified positions.

      Example:

           assert ([1, 3, 2, 4] as int[]) == ([1, 2, 3, 4] as int[]).swap(1, 2)

      Parameters:
        `self` - a boolean array
        `i` - a position
        `j` - a position
      Returns:
        self
      Since:
        2.4.0

    - #### public static long[] swap(long[] self, int i, int j)

      Swaps two elements at the specified positions.

      Example:

           assert ([1, 3, 2, 4] as long[]) == ([1, 2, 3, 4] as long[]).swap(1, 2)

      Parameters:
        `self` - a boolean array
        `i` - a position
        `j` - a position
      Returns:
        self
      Since:
        2.4.0

    - #### public static float[] swap(float[] self, int i, int j)

      Swaps two elements at the specified positions.

      Example:

           assert ([1, 3, 2, 4] as float[]) == ([1, 2, 3, 4] as float[]).swap(1, 2)

      Parameters:
        `self` - a boolean array
        `i` - a position
        `j` - a position
      Returns:
        self
      Since:
        2.4.0

    - #### public static double[] swap(double[] self, int i, int j)

      Swaps two elements at the specified positions.

      Example:

           assert ([1, 3, 2, 4] as double[]) == ([1, 2, 3, 4] as double[]).swap(1, 2)

      Parameters:
        `self` - a boolean array
        `i` - a position
        `j` - a position
      Returns:
        self
      Since:
        2.4.0

    - #### <T> public static T[] swap(T[] self, int i, int j)

      Swaps two elements at the specified positions.

      Example:

           assert (["a", "c", "b", "d"] as String[]) == (["a", "b", "c", "d"] as String[]).swap(1, 2)

      Parameters:
        `self` - an array
        `i` - a position
        `j` - a position
      Returns:
        self
      Since:
        2.4.0

    - #### public static boolean[] tail(boolean[] self)

      Returns the items from the boolean array excluding the first item.

           boolean[] array = [true, false, true]
           def result = array.tail()
           assert result == [false, true]
           assert array.class.componentType == result.class.componentType

      throws:
        UnsupportedOperationException if the array is empty
      Parameters:
        `self` - an array
      Returns:
        an array without its first element
      Since:
        5.0.0

    - #### public static byte[] tail(byte[] self)

      Returns the items from the byte array excluding the first item.

           byte[] bytes = [1, 2, 3]
           def result = bytes.tail()
           assert result == [2, 3]
           assert bytes.class.componentType == result.class.componentType

      throws:
        UnsupportedOperationException if the array is empty
      Parameters:
        `self` - an array
      Returns:
        an array without its first element
      Since:
        5.0.0

    - #### public static char[] tail(char[] self)

      Returns the items from the char array excluding the first item.

           char[] chars = ['a', 'b', 'c']
           def result = chars.tail()
           assert result == ['b', 'c']
           assert chars.class.componentType == result.class.componentType

      throws:
        UnsupportedOperationException if the array is empty
      Parameters:
        `self` - an array
      Returns:
        an array without its first element
      Since:
        5.0.0

    - #### public static short[] tail(short[] self)

      Returns the items from the short array excluding the first item.

           short[] shorts = [10, 20, 30]
           def result = shorts.tail()
           assert result == [20, 30]
           assert shorts.class.componentType == result.class.componentType

      throws:
        UnsupportedOperationException if the array is empty
      Parameters:
        `self` - an array
      Returns:
        an array without its first element
      Since:
        5.0.0

    - #### public static int[] tail(int[] self)

      Returns the items from the int array excluding the first item.

           int[] ints = [1, 3, 5]
           def result = ints.tail()
           assert result == [3, 5]
           assert ints.class.componentType == result.class.componentType

      throws:
        UnsupportedOperationException if the array is empty
      Parameters:
        `self` - an array
      Returns:
        an array without its first element
      Since:
        5.0.0

    - #### public static long[] tail(long[] self)

      Returns the items from the long array excluding the first item.

           long[] longs = [2L, 4L, 6L]
           def result = longs.tail()
           assert result == [4L, 6L]
           assert longs.class.componentType == result.class.componentType

      throws:
        UnsupportedOperationException if the array is empty
      Parameters:
        `self` - an array
      Returns:
        an array without its first element
      Since:
        5.0.0

    - #### public static float[] tail(float[] self)

      Returns the items from the float array excluding the first item.

           float[] floats = [2.0f, 4.0f, 6.0f]
           def result = floats.tail()
           assert result == [4.0f, 6.0f]
           assert floats.class.componentType == result.class.componentType

      throws:
        UnsupportedOperationException if the array is empty
      Parameters:
        `self` - an array
      Returns:
        an array without its first element
      Since:
        5.0.0

    - #### public static double[] tail(double[] self)

      Returns the items from the double array excluding the first item.

           double[] doubles = [10.0d, 20.0d, 30.0d]
           def result = doubles.tail()
           assert result == [20.0d, 30.0d]
           assert doubles.class.componentType == result.class.componentType

      throws:
        UnsupportedOperationException if the array is empty
      Parameters:
        `self` - an array
      Returns:
        an array without its first element
      Since:
        5.0.0

    - #### <T> public static T[] tail(T[] self)

      Returns the items from the array excluding the first item.

           String[] strings = ["a", "b", "c"]
           def result = strings.tail()
           assert result.class.componentType == String
           String[] expected = ["b", "c"]
           assert result == expected

      throws:
        UnsupportedOperationException if the array is empty
      Parameters:
        `self` - an array
      Returns:
        an array without its first element
      Since:
        1.7.3

    - #### <T> public static T[] take(T[] self, int num)

      Returns the first `num` elements from the head of this array.

           String[] strings = [ 'a', 'b', 'c' ]
           assert strings.take( 0 ) == [] as String[]
           assert strings.take( 2 ) == [ 'a', 'b' ] as String[]
           assert strings.take( 5 ) == [ 'a', 'b', 'c' ] as String[]

      Parameters:
        `self` - the original array
        `num` - the number of elements to take from this array
      Returns:
        an array consisting of the first `num` elements of this array, or else the whole array if it has less than `num` elements.
      Since:
        1.8.1

    - #### <T> public static T[] takeRight(T[] self, int num)

      Returns the last `num` elements from the tail of this array.

           String[] strings = [ 'a', 'b', 'c' ]
           assert strings.takeRight( 0 ) == [] as String[]
           assert strings.takeRight( 2 ) == [ 'b', 'c' ] as String[]
           assert strings.takeRight( 5 ) == [ 'a', 'b', 'c' ] as String[]

      Parameters:
        `self` - the original array
        `num` - the number of elements to take from this array
      Returns:
        an array consisting of the last `num` elements of this array, or else the whole array if it has less than `num` elements.
      Since:
        2.4.0

    - #### <T> public static T[] takeWhile(T[] self, @ClosureParams(FirstParam.Component.class)
      Closure<?> condition)

      Returns the longest prefix of this array where each element passed to the given closure evaluates to true.

           def nums = [ 1, 3, 2 ] as Integer[]
           assert nums.takeWhile{ it < 1 } == [] as Integer[]
           assert nums.takeWhile{ it < 3 } == [ 1 ] as Integer[]
           assert nums.takeWhile{ it < 4 } == [ 1, 3, 2 ] as Integer[]

      Parameters:
        `self` - the original array
        `condition` - the closure that must evaluate to true to continue taking elements
      Returns:
        A prefix of the given array where each element passed to the given closure evaluates to true.
      Since:
        1.8.7

    - #### @SuppressWarnings("unchecked")
      public static List<Boolean> toList(boolean[] self)

      Converts this array to a List of the same size, with each element added to the list.

      Parameters:
        `self` - a boolean array
      Returns:
        A list containing the contents of this array.
      Since:
        1.6.0

    - #### @SuppressWarnings("unchecked")
      public static List<Byte> toList(byte[] self)

      Converts this array to a List of the same size, with each element added to the list.

      Parameters:
        `self` - a byte array
      Returns:
        A list containing the contents of this array.
      Since:
        1.0

    - #### @SuppressWarnings("unchecked")
      public static List<Character> toList(char[] self)

      Converts this array to a List of the same size, with each element added to the list.

      Parameters:
        `self` - a char array
      Returns:
        A list containing the contents of this array.
      Since:
        1.0

    - #### @SuppressWarnings("unchecked")
      public static List<Short> toList(short[] self)

      Converts this array to a List of the same size, with each element added to the list.

      Parameters:
        `self` - a short array
      Returns:
        A list containing the contents of this array.
      Since:
        1.0

    - #### @SuppressWarnings("unchecked")
      public static List<Integer> toList(int[] self)

      Converts this array to a List of the same size, with each element added to the list.

      Parameters:
        `self` - an int array
      Returns:
        A list containing the contents of this array.
      Since:
        1.0

    - #### @SuppressWarnings("unchecked")
      public static List<Long> toList(long[] self)

      Converts this array to a List of the same size, with each element added to the list.

      Parameters:
        `self` - a long array
      Returns:
        A list containing the contents of this array.
      Since:
        1.0

    - #### @SuppressWarnings("unchecked")
      public static List<Float> toList(float[] self)

      Converts this array to a List of the same size, with each element added to the list.

      Parameters:
        `self` - a float array
      Returns:
        A list containing the contents of this array.
      Since:
        1.0

    - #### @SuppressWarnings("unchecked")
      public static List<Double> toList(double[] self)

      Converts this array to a List of the same size, with each element added to the list.

      Parameters:
        `self` - a double array
      Returns:
        A list containing the contents of this array.
      Since:
        1.0

    - #### <T> public static List<T> toList(T[] self)

      Converts this array to a List of the same size, with each element added to the list.

      Parameters:
        `self` - an object array
      Returns:
        A mutable list containing the contents of this array.
      Since:
        1.0

    - #### @SuppressWarnings("unchecked")
      public static Set<Boolean> toSet(boolean[] self)

      Converts this array to a Set, with each unique element added to the set.

           boolean[] array = [true, false, true]
           Set expected = [true, false]
           assert array.toSet() == expected

      Parameters:
        `self` - a boolean array
      Returns:
        A set containing the unique contents of this array.
      Since:
        1.8.0

    - #### @SuppressWarnings("unchecked")
      public static Set<Byte> toSet(byte[] self)

      Converts this array to a Set, with each unique element added to the set.

           byte[] array = [1, 2, 3, 2, 1]
           Set expected = [1, 2, 3]
           assert array.toSet() == expected

      Parameters:
        `self` - a byte array
      Returns:
        A set containing the unique contents of this array.
      Since:
        1.8.0

    - #### @SuppressWarnings("unchecked")
      public static Set<Character> toSet(char[] self)

      Converts this array to a Set, with each unique element added to the set.

           char[] array = 'xyzzy'.chars
           Set expected = ['x', 'y', 'z']
           assert array.toSet() == expected

      Parameters:
        `self` - a char array
      Returns:
        A set containing the unique contents of this array.
      Since:
        1.8.0

    - #### @SuppressWarnings("unchecked")
      public static Set<Short> toSet(short[] self)

      Converts this array to a Set, with each unique element added to the set.

           short[] array = [1, 2, 3, 2, 1]
           Set expected = [1, 2, 3]
           assert array.toSet() == expected

      Parameters:
        `self` - a short array
      Returns:
        A set containing the unique contents of this array.
      Since:
        1.8.0

    - #### @SuppressWarnings("unchecked")
      public static Set<Integer> toSet(int[] self)

      Converts this array to a Set, with each unique element added to the set.

           int[] array = [1, 2, 3, 2, 1]
           Set expected = [1, 2, 3]
           assert array.toSet() == expected

      Parameters:
        `self` - an int array
      Returns:
        A set containing the unique contents of this array.
      Since:
        1.8.0

    - #### @SuppressWarnings("unchecked")
      public static Set<Long> toSet(long[] self)

      Converts this array to a Set, with each unique element added to the set.

           long[] array = [1, 2, 3, 2, 1]
           Set expected = [1, 2, 3]
           assert array.toSet() == expected

      Parameters:
        `self` - a long array
      Returns:
        A set containing the unique contents of this array.
      Since:
        1.8.0

    - #### @SuppressWarnings("unchecked")
      public static Set<Float> toSet(float[] self)

      Converts this array to a Set, with each unique element added to the set.

           float[] array = [1.0f, 2.0f, 3.0f, 2.0f, 1.0f]
           Set expected = [1.0f, 2.0f, 3.0f]
           assert array.toSet() == expected

      Parameters:
        `self` - a float array
      Returns:
        A set containing the unique contents of this array.
      Since:
        1.8.0

    - #### @SuppressWarnings("unchecked")
      public static Set<Double> toSet(double[] self)

      Converts this array to a Set, with each unique element added to the set.

           double[] array = [1.0d, 2.0d, 3.0d, 2.0d, 1.0d]
           Set expected = [1.0d, 2.0d, 3.0d]
           assert array.toSet() == expected

      Parameters:
        `self` - a double array
      Returns:
        A set containing the unique contents of this array.
      Since:
        1.8.0

    - #### <T> public static Set<T> toSet(T[] self)

      Converts this array to a Set, with each unique element added to the set.

      Parameters:
        `self` - an object array
      Returns:
        A set containing the unique contents of this array.
      Since:
        5.0.0

    - #### <T> public static T[] toSorted(T[] self)

      Returns a sorted version of the given array using the supplied comparator.

      Parameters:
        `self` - the array to be sorted
      Returns:
        the sorted array
      See Also:
        toSorted(Object[], Comparator)
      Since:
        2.4.0

    - #### <T> public static T[] toSorted(T[] self, Comparator<? super T> comparator)

      Returns a sorted version of the given array using the supplied comparator to determine the resulting order.

           def sumDigitsComparator = [compare: { num1, num2 -> num1.toString().toList()*.toInteger().sum() <=> num2.toString().toList()*.toInteger().sum() }] as Comparator
           Integer[] nums = [9, 44, 222, 7000]
           def result = nums.toSorted(sumDigitsComparator)
           assert result instanceof Integer[]
           assert result == [222, 7000, 44, 9]

      Parameters:
        `self` - the array to be sorted
        `comparator` - a Comparator used for the comparison
      Returns:
        the sorted array
      Since:
        2.4.0

    - #### <T> public static T[] toSorted(T[] self, @ClosureParams(value=FromString.class,options={"T","T,T"})
      Closure<?> closure)

      Sorts the elements from this array into a newly created array using the Closure to determine the correct ordering.

      If the closure has two parameters it is used like a traditional Comparator. I.e. it should compare its two parameters for order, returning a negative integer, zero, or a positive integer when the first parameter is less than, equal to, or greater than the second respectively. Otherwise, the Closure is assumed to take a single parameter and return a Comparable (typically an Integer) which is then used for further comparison.

      Parameters:
        `self` - the array containing the elements to be sorted
        `closure` - a Closure used to determine the correct ordering
      Returns:
        a sorted array
      See Also:
        toSorted(Object[], Comparator)
      Since:
        2.4.0

    - #### public static SpreadMap toSpreadMap(Object[] self)

      Creates a spreadable map from this array.

      Parameters:
        `self` - an object array
      Returns:
        a newly created SpreadMap
      See Also:
        SpreadMap.SpreadMap
      Since:
        1.0

    - #### public static String toString(boolean[] self)

      Returns the string representation of the given array.

           boolean[] array = [false, true, false]
           assert array.toString() == '[false, true, false]'

      Parameters:
        `self` - an array
      Returns:
        the string representation
      Since:
        1.6.0

    - #### public static String toString(byte[] self)

      Returns the string representation of the given array.

           byte[] array = [1, 2, 3, 2, 1]
           assert array.toString() == '[1, 2, 3, 2, 1]'

      Parameters:
        `self` - an array
      Returns:
        the string representation
      Since:
        1.6.0

    - #### public static String toString(char[] self)

      Returns the string representation of the given array.

           char[] array = 'abcd'.chars
           assert array instanceof char[]
           assert array.toString() == 'abcd'

      Parameters:
        `self` - an array
      Returns:
        the string representation
      Since:
        1.6.0

    - #### public static String toString(short[] self)

      Returns the string representation of the given array.

           short[] array = [1, 2, 3, 2, 1]
           assert array.toString() == '[1, 2, 3, 2, 1]'

      Parameters:
        `self` - an array
      Returns:
        the string representation
      Since:
        1.6.0

    - #### public static String toString(int[] self)

      Returns the string representation of the given array.

           int[] array = [1, 2, 3, 2, 1]
           assert array.toString() == '[1, 2, 3, 2, 1]'

      Parameters:
        `self` - an array
      Returns:
        the string representation
      Since:
        1.6.0

    - #### public static String toString(long[] self)

      Returns the string representation of the given array.

           long[] array = [1, 2, 3, 2, 1]
           assert array.toString() == '[1, 2, 3, 2, 1]'

      Parameters:
        `self` - an array
      Returns:
        the string representation
      Since:
        1.6.0

    - #### public static String toString(float[] self)

      Returns the string representation of the given array.

           float[] array = [1, 2, 3, 2, 1]
           assert array.toString() == '[1.0, 2.0, 3.0, 2.0, 1.0]'

      Parameters:
        `self` - an array
      Returns:
        the string representation
      Since:
        1.6.0

    - #### public static String toString(double[] self)

      Returns the string representation of the given array.

           double[] array = [1, 2, 3, 2, 1]
           assert array.toString() == '[1.0, 2.0, 3.0, 2.0, 1.0]'

      Parameters:
        `self` - an array
      Returns:
        the string representation
      Since:
        1.6.0

    - #### public static String toString(Object[] self)

      Returns the string representation of the given array.

      Parameters:
        `self` - an array
      Returns:
        the string representation
      Since:
        1.0

    - #### <T> public static T[] toUnique(T[] self)

      Returns a new Array containing the items from the original Array but with duplicates removed using the natural ordering of the items in the array.

           String[] letters = ['c', 'a', 't', 's', 'a', 't', 'h', 'a', 't']
           String[] expected = ['c', 'a', 't', 's', 'h']
           def result = letters.toUnique()
           assert result == expected
           assert result.class.componentType == String

      Parameters:
        `self` - an array
      Returns:
        the unique items from the array
      Since:
        2.4.0

    - #### <T> public static T[] toUnique(T[] self, Comparator<? super T> comparator)

      Returns a new Array containing the items from the original Array but with duplicates removed with the supplied comparator determining which items are unique.

           String[] letters = ['c', 'a', 't', 's', 'A', 't', 'h', 'a', 'T']
           String[] lower = ['c', 'a', 't', 's', 'h']
           class LowerComparator implements Comparator {
               int compare(a, b) { a.toLowerCase() <=> b.toLowerCase() }
           }
           assert letters.toUnique(new LowerComparator()) == lower

      Parameters:
        `self` - an array
        `comparator` - a Comparator used to determine unique (equal) items If `null`, the Comparable natural ordering of the elements will be used.
      Returns:
        the unique items from the array
      Since:
        2.4.0

    - #### <T> public static T[] toUnique(T[] self, @ClosureParams(value=FromString.class,options={"T","T,T"})
      Closure<?> closure)

      Returns a new Array containing the items from the original Array but with duplicates removed with the supplied closure determining which items are unique.

           String[] letters = ['c', 'a', 't', 's', 'A', 't', 'h', 'a', 'T']
           String[] expected = ['c', 'a', 't', 's', 'h']
           assert letters.toUnique{ p1, p2 -> p1.toLowerCase() <=> p2.toLowerCase() } == expected
           assert letters.toUnique{ it.toLowerCase() } == expected

      Parameters:
        `self` - an array
        `closure` - a Closure used to determine unique items
      Returns:
        the unique items from the array

    - #### public static boolean transpose(boolean self)

      A transpose method for 2D boolean arrays.

      Example usage:

           boolean[][] array = [[false, false], [true, true]]
           boolean[][] expected = [[false, true], [false, true]]
           def result = array.transpose()
           assert result == expected
           assert array.class.componentType == result.class.componentType

      Parameters:
        `self` - a 2D boolean array
      Returns:
        the transposed 2D boolean array
      Since:
        5.0.0

    - #### public static byte transpose(byte self)

      A transpose method for 2D byte arrays.

      Example usage:

           byte[][] bytes = [[1, 10], [2, 20]]
           byte[][] expected = [[1, 2], [10, 20]]
           def result = bytes.transpose()
           assert result == expected
           assert bytes.class.componentType == result.class.componentType

      Parameters:
        `self` - a 2D byte array
      Returns:
        the transposed 2D byte array
      Since:
        5.0.0

    - #### public static char transpose(char self)

      A transpose method for 2D char arrays.

      Example usage:

           char[][] chars = [['a', 'b'], ['A', 'B']]
           char[][] expected = [['a', 'A'], ['b', 'B']]
           def result = chars.transpose()
           assert result == expected
           assert chars.class.componentType == result.class.componentType

      Parameters:
        `self` - a 2D char array
      Returns:
        the transposed 2D char array
      Since:
        5.0.0

    - #### public static short transpose(short self)

      A transpose method for 2D short arrays.

      Example usage:

           short[][] shorts = [[1, 10], [100, 1000]]
           short[][] expected = [[1, 100], [10, 1000]]
           def result = shorts.transpose()
           assert result == expected
           assert shorts.class.componentType == result.class.componentType

      Parameters:
        `self` - a 2D short array
      Returns:
        the transposed 2D short array
      Since:
        5.0.0

    - #### public static int transpose(int self)

      A transpose method for 2D int arrays.

      Example usage:

           int[][] nums = [[10, 15, 20], [30, 35, 40]]
           int[][] expected = [[10, 30], [15, 35], [20, 40]]
           assert nums.transpose() == expected

      Parameters:
        `self` - a 2D int array
      Returns:
        the transposed 2D int array
      Since:
        3.0.8

    - #### public static long transpose(long self)

      A transpose method for 2D long arrays.

      Example usage:

           long[][] longs = [[1L, 3L, 5L], [2L, 4L, 6L]]
           long[][] expected = [[1L, 2L], [3L, 4L], [5L, 6L]]
           def result = longs.transpose()
           assert result == expected
           assert longs.class.componentType == result.class.componentType

      Parameters:
        `self` - a 2D long array
      Returns:
        the transposed 2D long array
      Since:
        3.0.8

    - #### public static float transpose(float self)

      A transpose method for 2D float arrays.

      Example usage:

           float[][] floats = [[1.0f, 10.0f], [2.0f, 20.0f]]
           float[][] expected = [[1.0f, 2.0f], [10.0f, 20.0f]]
           def result = floats.transpose()
           assert result == expected
           assert floats.class.componentType == result.class.componentType

      Parameters:
        `self` - a 2D float array
      Returns:
        the transposed 2D float array
      Since:
        5.0.0

    - #### public static double transpose(double self)

      A transpose method for 2D double arrays.

      Example usage:

           double[][] doubles = [[1.0d, 10.0d], [2.0d, 20.0d]]
           double[][] expected = [[1.0d, 2.0d], [10.0d, 20.0d]]
           def result = doubles.transpose()
           assert result == expected
           assert doubles.class.componentType == result.class.componentType

      Parameters:
        `self` - a 2D double array
      Returns:
        the transposed 2D double array
      Since:
        3.0.8

    - #### public static Iterator<double[]> transposing(double self)

      An iterator of the columns of the array.

           double[][] nums = [[1.0d, 2.0d], [10.0d, 20.0d]]
           assert nums.transpose() == nums.transposing().toList()

      Parameters:
        `self` - a double[][]
      Returns:
        the iterator
      Since:
        5.0.0

    - #### public static Iterator<float[]> transposing(float self)

      An iterator of the columns of the array.

           float[][] nums = [[1.0f, 2.0f], [10.0f, 20.0f]]
           assert nums.transpose() == nums.transposing().toList()

      Parameters:
        `self` - a float[][]
      Returns:
        the iterator
      Since:
        5.0.0

    - #### public static Iterator<int[]> transposing(int self)

      An iterator of the columns of the array.

           int[][] nums = [[1, 2], [10, 20]]
           assert nums.transpose() == nums.transposing().toList()
           assert nums.transposing().collect{ int[] col -> col.sum() } == [11, 22]

      Parameters:
        `self` - an int[][]
      Returns:
        the iterator
      Since:
        5.0.0

    - #### public static Iterator<long[]> transposing(long self)

      An iterator of the columns of the array.

           long[][] nums = [[1L, 2L], [10L, 20L]]
           assert nums.transpose() == nums.transposing().toList()
           assert nums.transposing().collect{ long[] col -> col.sum() } == [11L, 22L]

      Parameters:
        `self` - a long[][]
      Returns:
        the iterator
      Since:
        5.0.0

    - #### public static Object[] union(Object[] left, Collection<?> right)

      Creates an object array containing elements from an original array plus those from a Collection. This is similar to plus(Object[], Collection) but always return an Object array and so might be more applicable when adding heterogeneous arrays.

           Integer[] a = [1, 2, 3]
           def result = a.union(['foo', 'bar'])
           assert result.class == Object[]
           assert result == new Object[]{1, 2, 3, 'foo', 'bar'}

      Parameters:
        `left` - the array
        `right` - a Collection to be appended
      Returns:
        A new Object array containing left with right appended to it.
      Since:
        4.0.0

    - #### public static Object[] union(Object[] left, Iterable<?> right)

      Creates an Object array containing elements from an original array plus those from an Iterable. This is similar to plus(Object[], Iterable) but always return an Object array and so might be more applicable when adding heterogeneous arrays.

           class AbcIterable implements Iterable {
               Iterator iterator() { "abc".iterator() }
           }
           String[] array = ['x', 'y', 'z']
           def result = array.union(new AbcIterable())
           assert result.class == Object[]
           assert result == new Object[]{'x', 'y', 'z', 'a', 'b', 'c'}

      Parameters:
        `left` - the array
        `right` - an Iterable to be appended
      Returns:
        A new Object array containing elements from left with those from right appended.
      Since:
        4.0.0

    - #### public static Object[] union(Object[] left, Object[] right)

      Creates an Object array as a union of two arrays. This is similar to plus(Object[], Object[]) but always return an Object array and so might be more applicable when adding heterogeneous arrays.

           Integer[] a = [1, 2, 3]
           String[] b = ['foo', 'bar']
           def result = a.union(b)
           assert result.class == Object[]
           assert result == new Object[]{1, 2, 3, 'foo', 'bar'}

      Parameters:
        `left` - the left Array
        `right` - the right Array
      Returns:
        A new Object array containing right appended to left.
      Since:
        4.0.0

    - #### public static Object[] union(Object[] left, Object right)

      Creates an Object array containing elements from an original array plus an additional appended element. This is similar to plus(Object[], Object) but always return an Object array and so might be more applicable when adding heterogeneous arrays.

           Integer[] a = [1, 2, 3]
           def result = a.union('foo')
           assert result.class == Object[]
           assert result == new Object[]{1, 2, 3, 'foo'}

      Parameters:
        `left` - the array
        `right` - the value to append
      Returns:
        A new Object array containing left with right appended to it.
      Since:
        4.0.0

    - #### <K, V> public static Map<K, V> withCollectedKeys(V[] values, Function<? super V, K> keyTransform)

      A variant of withCollectedKeys for arrays.

      Parameters:
        `values` - an array
        `keyTransform` - a function for transforming array elements into values
      Returns:
        the collector with all transformed values added to it
      See Also:
        DefaultGroovyMethods.withCollectedKeys
      Since:
        5.0.0

    - #### <K, V> public static Map<K, V> withCollectedKeys(V[] values, Map<K, V> collector, Function<? super V, K> keyTransform)

      A variant of withCollectedKeys for arrays.

      Parameters:
        `values` - an array
        `collector` - the Map into which the transformed entries are put
        `keyTransform` - a function for transforming array elements into values
      Returns:
        the collector with all transformed values added to it
      See Also:
        DefaultGroovyMethods.withCollectedKeys
      Since:
        5.0.0

    - #### <K, V> public static Map<K, V> withCollectedValues(K[] keys, Function<? super K, V> valueTransform)

      A variant of withCollectedValues for arrays.

      Parameters:
        `keys` - an array
        `valueTransform` - a function for transforming array elements into values
      Returns:
        A map of the transformed entries.
      Since:
        5.0.0

    - #### <K, V> public static Map<K, V> withCollectedValues(K[] keys, Map<K, V> collector, Function<? super K, V> valueTransform)

      A variant of withCollectedValues for arrays.

      Parameters:
        `keys` - an array
        `collector` - the Map into which the transformed entries are put
        `valueTransform` - a function for transforming array elements into values
      Returns:
        The collector with all transformed values added to it.
      Since:
        5.0.0

    - #### public static List<Tuple2<Integer, Integer>> withIndex(int[] self)

      Zips an int array with indices in (value, index) order.

      Example usage:

           int[] nums = [42, -1]
           assert [[42, 0], [-1, 1]] == nums.withIndex()
           assert ["0: 42", "1: -1"] == nums.withIndex().collect { n, idx -> "$idx: $n" }

      Parameters:
        `self` - an int array
      Returns:
        a zipped list with indices
      See Also:
        DefaultGroovyMethods.withIndex
      Since:
        5.0.0

    - #### public static List<Tuple2<Integer, Integer>> withIndex(int[] self, int offset)

      Zips an int array with indices in (value, index) order starting from a given index.

      Example usage:

           int[] nums = [42, -1]
           assert [[42, 5], [-1, 6]] == nums.withIndex(5)
           assert ["5: 42", "6: -1"] == nums.withIndex(5).collect { n, idx -> "$idx: $n" }

      Parameters:
        `self` - an int array
        `offset` - an index to start from
      Returns:
        a zipped list with indices
      See Also:
        DefaultGroovyMethods.withIndex
      Since:
        5.0.0

    - #### public static List<Tuple2<Long, Integer>> withIndex(long[] self)

      Zips a long array with indices in (value, index) order.

      Example usage:

           long[] nums = [42L, -1L]
           assert [[42L, 0], [-1L, 1]] == nums.withIndex()
           assert ["0: 42", "1: -1"] == nums.withIndex().collect { n, idx -> "$idx: $n" }

      Parameters:
        `self` - a long array
      Returns:
        a zipped list with indices
      See Also:
        DefaultGroovyMethods.withIndex
      Since:
        5.0.0

    - #### public static List<Tuple2<Long, Integer>> withIndex(long[] self, int offset)

      Zips a long array with indices in (value, index) order starting from a given index.

      Example usage:

           long[] nums = [42L, -1L]
           assert [[42L, 5], [-1L, 6]] == nums.withIndex(5)
           assert ["5: 42", "6: -1"] == nums.withIndex(5).collect { n, idx -> "$idx: $n" }

      Parameters:
        `self` - a long array
        `offset` - an index to start from
      Returns:
        a zipped list with indices
      See Also:
        DefaultGroovyMethods.withIndex
      Since:
        5.0.0

    - #### public static List<Tuple2<Float, Integer>> withIndex(float[] self)

      Zips a float array with indices in (value, index) order.

      Example usage:

           float[] nums = [42.0f, -1.0f]
           assert [[42.0f, 0], [-1.0f, 1]] == nums.withIndex()
           assert ["0: 42.0", "1: -1.0"] == nums.withIndex().collect { n, idx -> "$idx: $n" }

      Parameters:
        `self` - a float array
      Returns:
        a zipped list with indices
      See Also:
        DefaultGroovyMethods.withIndex
      Since:
        5.0.0

    - #### public static List<Tuple2<Float, Integer>> withIndex(float[] self, int offset)

      Zips a float array with indices in (value, index) order starting from a given index.

      Example usage:

           float[] nums = [42.0f, -1.0f]
           assert [[42.0f, 5], [-1.0f, 6]] == nums.withIndex(5)
           assert ["5: 42.0", "6: -1.0"] == nums.withIndex(5).collect { n, idx -> "$idx: $n" }

      Parameters:
        `self` - a float array
        `offset` - an index to start from
      Returns:
        a zipped list with indices
      See Also:
        DefaultGroovyMethods.withIndex
      Since:
        5.0.0

    - #### public static List<Tuple2<Double, Integer>> withIndex(double[] self)

      Zips a double array with indices in (value, index) order.

      Example usage:

           double[] nums = [42.0d, -1.0d]
           assert [[42.0d, 0], [-1.0d, 1]] == nums.withIndex()
           assert ["0: 42.0", "1: -1.0"] == nums.withIndex().collect { n, idx -> "$idx: $n" }

      Parameters:
        `self` - a double array
      Returns:
        a zipped list with indices
      See Also:
        DefaultGroovyMethods.withIndex
      Since:
        5.0.0

    - #### public static List<Tuple2<Double, Integer>> withIndex(double[] self, int offset)

      Zips a double array with indices in (value, index) order starting from a given index.

      Example usage:

           double[] nums = [42.0d, -1.0d]
           assert [[42.0d, 5], [-1.0d, 6]] == nums.withIndex(5)
           assert ["5: 42.0", "6: -1.0"] == nums.withIndex(5).collect { n, idx -> "$idx: $n" }

      Parameters:
        `self` - a double array
        `offset` - an index to start from
      Returns:
        a zipped list with indices
      See Also:
        DefaultGroovyMethods.withIndex
      Since:
        5.0.0

    - #### <T> public static List<Tuple2<T, Integer>> withIndex(T[] self)

      Zips an object array with indices in (value, index) order.

      Example usage:

           String[] letters = ['a', 'z']
           assert [['a', 0], ['z', 1]] == letters.withIndex()

      Parameters:
        `self` - an object array
      Returns:
        a zipped list with indices
      See Also:
        DefaultGroovyMethods.withIndex
      Since:
        5.0.0

    - #### <T> public static List<Tuple2<T, Integer>> withIndex(T[] self, int offset)

      Zips an object array with indices in (value, index) order starting from a given index.

      Example usage:

           String[] letters = ['a', 'z']
           assert [['a', 5], ['z', 6]] == letters.withIndex(5)
           assert ["5: a", "6: z"] == letters.withIndex(5).collect { n, idx -> "$idx: $n" }

      Parameters:
        `self` - an object array
        `offset` - an index to start from
      Returns:
        a zipped list with indices
      See Also:
        DefaultGroovyMethods.withIndex
      Since:
        5.0.0

    - #### public static List<Tuple2<Double, Double>> zip(double[] self, double[] other)

      A list of all the pairs from two arrays.

           double[] small = [1.0d, 2.0d, 3.0d]
           double[] large = [100d, 200d, 300d]
           assert [small, large].transpose() == small.zip(large)

      Parameters:
        `self` - a double[]
        `other` - another double[]
      Returns:
        a list of all the pairs from self and other
      Since:
        5.0.0

    - #### public static List<Tuple2<Float, Float>> zip(float[] self, float[] other)

      A list of all the pairs from two arrays.

           float[] small = [1.0f, 2.0f, 3.0f]
           float[] large = [100f, 200f, 300f]
           assert [small, large].transpose() == small.zip(large)

      Parameters:
        `self` - a float[]
        `other` - another float[]
      Returns:
        a list of all the pairs from self and other
      Since:
        5.0.0

    - #### public static List<Tuple2<Integer, Integer>> zip(int[] self, int[] other)

      A list of all the pairs from two arrays.

           int[] small = [1, 2, 3]
           int[] large = [100, 200, 300]
           assert [101, 202, 303] == small.zip(large).collect{ a, b -> a + b }
           assert [small, large].transpose() == small.zip(large)

      Parameters:
        `self` - an int[]
        `other` - another int[]
      Returns:
        a list of all the pairs from self and other
      Since:
        5.0.0

    - #### public static List<Tuple2<Long, Long>> zip(long[] self, long[] other)

      A list of all the pairs from two arrays.

           long[] small = [1L, 2L, 3L]
           long[] large = [100L, 200L, 300L]
           assert [101L, 202L, 303L] == small.zip(large).collect{ a, b -> a + b }
           assert [small, large].transpose() == small.zip(large)

      Parameters:
        `self` - a long[]
        `other` - another long[]
      Returns:
        a list of all the pairs from self and other
      Since:
        5.0.0

    - #### public static Iterator<Tuple2<Double, Double>> zipping(double[] self, double[] other)

      An iterator of all the pairs from two arrays.

           double[] small = [1.0d, 2.0d, 3.0d]
           double[] large = [100d, 200d, 300d]
           assert [small, large].transpose() == small.zipping(large).toList()

      Parameters:
        `self` - a double[]
        `other` - another double[]
      Returns:
        an iterator of all the pairs from self and other
      Since:
        5.0.0

    - #### public static Iterator<Tuple2<Float, Float>> zipping(float[] self, float[] other)

      An iterator of all the pairs from two arrays.

           float[] small = [1.0f, 2.0f, 3.0f]
           float[] large = [100f, 200f, 300f]
           assert [small, large].transpose() == small.zipping(large).toList()

      Parameters:
        `self` - a float[]
        `other` - another float[]
      Returns:
        an iterator of all the pairs from self and other
      Since:
        5.0.0

    - #### public static Iterator<Tuple2<Integer, Integer>> zipping(int[] self, int[] other)

      An iterator of all the pairs from two arrays.

           int[] small = [1, 2, 3]
           int[] large = [100, 200, 300]
           assert [101, 202, 303] == small.zipping(large).collect{ a, b -> a + b }
           assert [small, large].transpose() == small.zipping(large).toList()

      Parameters:
        `self` - an int[]
        `other` - another int[]
      Returns:
        an iterator of all the pairs from self and other
      Since:
        5.0.0

    - #### public static Iterator<Tuple2<Long, Long>> zipping(long[] self, long[] other)

      An iterator of all the pairs from two arrays.

           long[] small = [1L, 2L, 3L]
           long[] large = [100L, 200L, 300L]
           assert [101L, 202L, 303L] == small.zipping(large).collect{ a, b -> a + b }
           assert [small, large].transpose() == small.zipping(large).toList()

      Parameters:
        `self` - a long[]
        `other` - another long[]
      Returns:
        an iterator of all the pairs from self and other
      Since:
        5.0.0