# Class NamingContextEnumeration

java.lang.Object
org.apache.naming.NamingContextEnumeration

All Implemented Interfaces:
  `Enumeration<NameClassPair>, NamingEnumeration<NameClassPair>`

public class NamingContextEnumeration extends Object implements NamingEnumeration<NameClassPair>
Naming enumeration implementation.

## Field Summary

Fields
Modifier and Type
Field
Description
`protected final Iterator<NamingEntry>`
`iterator`
Underlying enumeration.

## Constructor Summary

Constructors
Constructor
Description
`NamingContextEnumeration(Iterator<NamingEntry> entries)`
Creates a new context enumeration.

## Method Summary

Modifier and Type
Method
Description
`void`
`close()`
`boolean`
`hasMore()`
`boolean`
`hasMoreElements()`
`NameClassPair`
`next()`
`NameClassPair`
`nextElement()`

### Methods inherited from class Object

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

### Methods inherited from interface Enumeration

`asIterator`

## Field Details

### iterator

protected final Iterator<NamingEntry> iterator
Underlying enumeration.

## Constructor Details

### NamingContextEnumeration

public NamingContextEnumeration(Iterator<NamingEntry> entries)
Creates a new context enumeration.

Parameters:
  `entries` - The iterator of naming entries

## Method Details

### next

public NameClassPair next() throws NamingException

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

### hasMore

public boolean hasMore() throws NamingException

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

### close

public void close() throws NamingException

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

### hasMoreElements

public boolean hasMoreElements()

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

### nextElement

public NameClassPair nextElement()

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