In Java 8, the Stream class does not have any method to wrap a an Iterable.
Instead, I am obtaining the Spliterator from the Iterable and then obtaining a Stream from StreamSupport like this:
boolean parallel = true;
StreamSupport.stream(spliterator(), parallel)
.filter(Row::isEmpty)
.collect(Collectors.toList())
.forEach(this::deleteRow);
Is there some other way of generating Stream operations on an Iterable that I am missing?
My similar question got marked as duplicate, but here is the helper methods I've used to avoid some of the boilerplate: