|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ClosableIterator
An iterator which should be closed after use. Some iterators take up resources which should be free'd as soon as possible, eg large structures which can be discarded early, or external resources such as database cursors.
Users of ClosableIterators (and thus of ExtendedIterator) should close the iterator when they are done with it, whether because they have found a desired element or because they have reached the end. If they do not, resources may leak or be reclaimed unpredictably or much later than convenient.
Implementors are encouraged to dispose of resources as soon as is convenient.
Method Summary | |
---|---|
void |
close()
Close the iterator. |
Methods inherited from interface java.util.Iterator |
---|
hasNext, next, remove |
Method Detail |
---|
void close()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |