A good pattern to use this iterator is with an outer try-with-resources
block:
for (ClosableIterable<Triple> triples : graph.iterate()) {
for (Triple t : triples) {
return t; // OK to terminate for-loop early
}
}
The above will ensure that underlying resources are closed even if
the iteration does not exhaust all triples.