Top Description Fields Constructors Methods
org.apache.naming

public Class NamingContextBindingsEnumeration

extends Object
implements NamingEnumeration<Binding>
Class Inheritance
All Implemented Interfaces
javax.naming.NamingEnumeration, java.util.Enumeration
Imports
java.util.Iterator, javax.naming.Binding, .CompositeName, .Context, .NamingEnumeration, .NamingException

Naming enumeration implementation.
Author
Remy Maucherat

Field Summary

Modifier and TypeField and Description
private final Context
ctx

The context for which this enumeration is being generated.

protected final Iterator<NamingEntry>
iterator

Underlying enumeration.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
close()

Implements javax.naming.NamingEnumeration.close.

Closes this enumeration.

public boolean
hasMore()

Implements javax.naming.NamingEnumeration.hasMore.

Determines whether there are any more elements in the enumeration.

public boolean
hasMoreElements()

Implements java.util.Enumeration.hasMoreElements.

Tests if this enumeration contains more elements.

public Binding
next()

Implements javax.naming.NamingEnumeration.next.

Retrieves the next element in the enumeration.

public Binding
nextElement()

Implements java.util.Enumeration.nextElement.

Returns the next element of this enumeration if this enumeration object has at least one more element to provide.

private Binding
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ctxback to summary
private final Context ctx

The context for which this enumeration is being generated.

iteratorback to summary
protected final Iterator<NamingEntry> iterator

Underlying enumeration.

Constructor Detail

NamingContextBindingsEnumerationback to summary
public NamingContextBindingsEnumeration(Iterator<NamingEntry> entries, Context ctx)

Method Detail

closeback to summary
public void close() throws NamingException

Implements javax.naming.NamingEnumeration.close.

Closes this enumeration.

Annotations
@Override
Exceptions
NamingException:

Doc from javax.naming.NamingEnumeration.close.

If a naming exception is encountered while closing the enumeration.

hasMoreback to summary
public boolean hasMore() throws NamingException

Implements javax.naming.NamingEnumeration.hasMore.

Determines whether there are any more elements in the enumeration.

Returns:boolean

Doc from javax.naming.NamingEnumeration.hasMore.

true if there is more in the enumeration ; false otherwise.

Annotations
@Override
Exceptions
NamingException:

Doc from javax.naming.NamingEnumeration.hasMore.

If a naming exception is encountered while attempting to determine whether there is another element in the enumeration. See NamingException and its subclasses for the possible naming exceptions.

hasMoreElementsback to summary
public boolean hasMoreElements()

Implements java.util.Enumeration.hasMoreElements.

Doc from java.util.Enumeration.hasMoreElements.

Tests if this enumeration contains more elements.

Returns:boolean

true if and only if this enumeration object contains at least one more element to provide; false otherwise.

Annotations
@Override
nextback to summary
public Binding next() throws NamingException

Implements javax.naming.NamingEnumeration.next.

Retrieves the next element in the enumeration.

Returns:Binding

Doc from javax.naming.NamingEnumeration.next.

The possibly null element in the enumeration. null is only valid for enumerations that can return null (e.g. Attribute.getAll() returns an enumeration of attribute values, and an attribute value can be null).

Annotations
@Override
Exceptions
NamingException:

Doc from javax.naming.NamingEnumeration.next.

If a naming exception is encountered while attempting to retrieve the next element. See NamingException and its subclasses for the possible naming exceptions.

nextElementback to summary
public Binding nextElement()

Implements java.util.Enumeration.nextElement.

Doc from java.util.Enumeration.nextElement.

Returns the next element of this enumeration if this enumeration object has at least one more element to provide.

Returns:Binding

the next element of this enumeration.

Annotations
@Override
nextElementInternalback to summary
private Binding nextElementInternal() throws NamingException