code: public static <T> T max(T[] self, @ClosureParams(FirstParam.Component.class) Closure closure) {
          return max((Iterable<T>)toList(self), closure);
      }
docs: Selects the maximum value found from the Object array
  using the closure to determine the correct ordering.
  <p>
  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.
  
  @param self    an array
  @param closure a Closure used to determine the correct ordering
  @return the maximum value
  @see #max(java.util.Collection, groovy.lang.Closure)
  @since 1.5.5