|
||||||||||
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.
However, if your code might not exhaust the iterator, (run untilIterator.hasNext()
returns false
),
ResourceIterator
provides you with a close()
method that should be invoked to free its
resources, by using a finally
-block, or try-with-resource.
ResourceIterable
,
Transaction
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 |