public class ContextBindings
extends java.lang.Object
implements javax.naming.NamingEnumeration
Modifier and Type | Field and Description |
---|---|
private java.util.Map |
bindings
A Map of the bindings of a Context.
|
private java.util.Iterator |
iterator
The iterator utilized in the Enumeration
|
Constructor and Description |
---|
ContextBindings(java.util.Map table)
Creates a ContextBindings object based upon an a Map of names and the objects
the names are bound to.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the ContextBindings instance, rendering it inoperable.
|
boolean |
hasMore()
Returns
true if there are more elements available, otherwise
false . |
boolean |
hasMoreElements()
Returns
true if there are more elements available, otherwise
false . |
java.lang.Object |
next()
Returns a
Binding created from the next available name. |
java.lang.Object |
nextElement()
Returns a
Binding created from the next available name. |
private java.util.Map bindings
private java.util.Iterator iterator
public ContextBindings(java.util.Map table)
table
is modified after instantiation
of ContextBindings, behavior is undefined and should be considered invalid.table
- The table upon which the ContextBindings is based.public boolean hasMoreElements()
true
if there are more elements available, otherwise
false
.hasMoreElements
in interface java.util.Enumeration
true
if there are more elements available, otherwise
false
public boolean hasMore() throws javax.naming.NamingException
true
if there are more elements available, otherwise
false
.hasMore
in interface javax.naming.NamingEnumeration
true
if there are more elements available, otherwise
false
javax.naming.NamingException
- if a naming exception is encounteredpublic java.lang.Object nextElement()
Binding
created from the next available name.nextElement
in interface java.util.Enumeration
public java.lang.Object next() throws javax.naming.NamingException
Binding
created from the next available name.next
in interface javax.naming.NamingEnumeration
javax.naming.NamingException
- if a naming exception occurspublic void close()
close
in interface javax.naming.NamingEnumeration