michaelrocks
12/25/2015, 3:43 PMpublic fun <T : Any> Iterable<T?>.requireNoNulls(): Iterable<T> {
for (element in this) {
if (element == null) {
throw IllegalArgumentException("null element found in $this.")
}
}
return this as Iterable<T>
}
As far as I understand after invoking this method the iterable may become empty.