T- the type of elements returned by the
public interface CloseableIterable<T> extends java.lang.Iterable<T>
Iterablewhich supports generation of
This interface is meant to be used in places where an
Iterator returned by an
state that is required to be cleared irrespective of whether data from the
Iterator is completely
Iterator.hasNext() is called till it returns
false) or not.
This interface provides a way for a user of such an
Iterable to discard data, by calling
CloseableIterator, it is expected that the user will either consume all the data from the
Iterator or explicitly call
AutoCloseable.close() to dispose the remaining data.
|Modifier and Type||Method and Description|