isEmpty

inline fun <T> Iterable<T>.isEmpty(): Boolean(source)

Determines if the given iterable contains no elements.

There is no precise Iterator equivalent to this method, since one can only ask an iterator whether it has any elements remaining (which one does using Iterator.hasNext).

Stream equivalent: !stream.findAny().isPresent()

Return

true if the iterable contains no elements

See also