Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.hp.hpl.jena.util.iterator
Interface ClosableIterator

All Superinterfaces:
  java.util.Iterator

All Known Subinterfaces:
  ExtendedIterator, NodeIterator, NsIterator, ResIterator, RSIterator, StmtIterator, TripleIterator

All Known Implementing Classes:
  EarlyBindingIterator, FilterDropIterator, FilterIterator, FilterKeepIterator, LazyIterator, Map1Iterator, MapFilterIterator, NiceIterator, NullIterator, RandomOrderIterator, SingletonIterator, TripleMatchIterator, UniqueExtendedIterator, WrappedIterator

    public interface ClosableIterator

extends java.util.Iterator

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.

Version:
  $Id: ClosableIterator.java,v 1.11 2008/01/02 12:07:35 andy_seaborne Exp $
Author:
  bwm

Method Summary
`void` | `close()` Close the iterator.

Methods inherited from interface java.util.Iterator
`hasNext, next, remove`

Method Detail

### close

    void close()

  Close the iterator. Other oeprations on this iterator may now throw an exception. A ClosableIterator may be closed as many times as desired - the subsequent calls do nothing.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP