code: public static <T> T[] defaultIfEmpty(T[] array, T[] defaultArray) {
      return isNotEmpty(array) ? array : defaultArray;
    }
docs: Returns the given {@code array} if not {@literal null} or empty, otherwise returns the {@code defaultArray}.
  
  @param <T> {@link Class} type of the elements in the array.
  @param array array to evaluate.
  @param defaultArray array to return if the given {@code array} is {@literal null} or empty.
  @return the given {@code array} if not {@literal null} or empty otherwise return the {@code defaultArray}.