public static <T> T getFirst(final T... array) {
    return (array != null && array.length > 0 ? array[0] : null);
  }
Gets the first element from the given array or null if the array reference is null or the array
length is 0.
<p>

@param <T> the Class type of the elements in the array.
@param array the array of elements from which to retrieve the first element.
@return the first element from the array or null if either the array reference is null or the
        array length is 0.
geode-core/src/main/java/org/apache/geode/internal/util/ArrayUtils.java