org.apache.naming.resources

## Class RecyclableNamingEnumeration<E>

- java.lang.Object
- - org.apache.naming.resources.RecyclableNamingEnumeration<E>

All Implemented Interfaces:
  Enumeration<E>, NamingEnumeration<E>

    public class RecyclableNamingEnumeration<E>
    extends Object
    implements NamingEnumeration<E>

Naming enumeration implementation.

Author:
  Remy Maucherat

### Field Summary

Fields
`protected Vector<E>` `entries` Entries.
`protected Enumeration<E>` `enumeration` Underlying enumeration.

### Constructor Summary

Constructors
Constructor and Description
`RecyclableNamingEnumeration(Vector<E> entries)`

### Method Summary

Methods
`void` `close()` Closes this enumeration.
`boolean` `hasMore()` Determines whether there are any more elements in the enumeration.
`boolean` `hasMoreElements()`
`E` `next()` Retrieves the next element in the enumeration.
`E` `nextElement()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### entries

    protected Vector<E> entries

Entries.

#### enumeration

    protected Enumeration<E> enumeration

Underlying enumeration.

### Constructor Detail

#### RecyclableNamingEnumeration

    public RecyclableNamingEnumeration(Vector<E> entries)

### Method Detail

#### next

    public E next()
           throws NamingException

Retrieves the next element in the enumeration.

Specified by:
  `next` in interface `NamingEnumeration<E>`
Throws:
  `NamingException`

#### hasMore

    public boolean hasMore()
                    throws NamingException

Determines whether there are any more elements in the enumeration.

Specified by:
  `hasMore` in interface `NamingEnumeration<E>`
Throws:
  `NamingException`

#### close

    public void close()
               throws NamingException

Closes this enumeration.

Specified by:
  `close` in interface `NamingEnumeration<E>`
Throws:
  `NamingException`

#### hasMoreElements

    public boolean hasMoreElements()

Specified by:
  `hasMoreElements` in interface `Enumeration<E>`

#### nextElement

    public E nextElement()

Specified by:
  `nextElement` in interface `Enumeration<E>`