code: public static <E, T extends Iterable<E>> T defaultIfEmpty(T iterable, T defaultIterable) {
      return iterable != null && iterable.iterator().hasNext() ? iterable : defaultIterable;
    }
docs: Returns the given {@link Iterable} if not {@literal null} or empty, otherwise returns the {@code defaultIterable}.
  
  @param <E> {@link Class} type of the elements in the {@link Iterable Iterables}.
  @param <T> concrete {@link Class} type of the {@link Iterable}.
  @param iterable {@link Iterable} to evaluate.
  @param defaultIterable {@link Iterable} to return if the given {@code iterable} is {@literal null} or empty.
  @return {@code iterable} if not {@literal null} or empty otherwise return {@code defaultIterable}.
  @see java.lang.Iterable