code: public static boolean isEmpty(Iterable<?> iterable) {
      if (iterable instanceof Collection) {
        return ((Collection<?>) iterable).isEmpty();
      }
      return !iterable.iterator().hasNext();
    }
docs: Determines if the given iterable contains no elements.
  
  <p>There is no precise {@link Iterator} equivalent to this method, since one can only ask an
  iterator whether it has any elements <i>remaining</i> (which one does using {@link
  Iterator#hasNext}).
  
  <p><b>{@code Stream} equivalent:</b> {@code !stream.findAny().isPresent()}
  
  @return {@code true} if the iterable contains no elements