|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- type of values returned by this Iteratorpublic interface ResourceIterator<T>
Closeable Iterator with associated resources that needs to be managed.
If the iterator is not depleted (run untilIterator.hasNext()
returns false
),
the close()
method should be invoked to free these resources
(i.e. in a finally
-block, or try-with-resource).
Method Summary | |
---|---|
void |
close()
Close the iterator early, freeing associated resources It is an error to use the iterator after this has been called. |
Methods inherited from interface java.util.Iterator |
---|
hasNext, next, remove |
Method Detail |
---|
void close()
close
in interface Closeable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |