|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ICloseableIterator<E>
An iterator that defines a close() method - you MUST close instances
of this interface. Many implementation depends on this in order to release
resources, terminate tasks, etc.
| Method Summary | |
|---|---|
void |
close()
Closes the iterator, releasing any associated resources. |
| Methods inherited from interface java.util.Iterator |
|---|
hasNext, next, remove |
| Method Detail |
|---|
void close()
close() if Iterator.hasNext()
method returns false to ensure that the iterator is closed
(and its resources release) as soon as it is exhausted.
Note: Implementations that support Iterator.remove() MUST NOT
eagerly close the iterator when it is exhausted since that would make it
impossible to remove the last visited statement. Instead they MUST wait
for an explicit close() by the application.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||