Holger's Java API

## com.antelmann.db
Interface DBEnumeration<T extends DBEntry>

All Superinterfaces:
  Closeable, Enumeration<T>

All Known Implementing Classes:
  AbstractDBEnumeration

    public interface DBEnumeration<T extends DBEntry>

extends Enumeration<T>, Closeable

a special Enumeration that allows to release its resources even though a caller has not completely iterated through this instance. Note that enumerating through an instance usually requires to be within a transaciton.

Since:
  30. März 2007, 13:55
Author:
  Holger Antelmann
See Also:
  `DBTransaction`

Method Summary
`void` `close()` Ends the iteration at this point and releases all associated resources.

Methods inherited from interface java.util.Enumeration
`hasMoreElements, nextElement`

Method Detail

### close

    void close()
               throws IOException

  Ends the iteration at this point and releases all associated resources. After this method is called, subsequent calls to other methods of this interface are expected to throw appropriate RuntimeExceptions, such as IllegalStateException. If the DBEnumeration has been calling nextElement() until hasMoreElements() returned false, calling this method is considered unnecessary. This method is mainly useful to be able to release the resources associated with this instance in case the caller intends to stop iterating while there may still be elements available.

  Specified by:
    `close` in interface `Closeable`
  Throws:
    `IOException`
  See Also:
    `IllegalStateException`

(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads