|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.Hashtable.Enumerator
A hashtable enumerator class. This class implements both the Enumeration and Iterator interfaces, but individual instances can be created with the Iterator methods disabled. This is necessary to avoid unintentionally increasing the capabilities granted a user by passing an Enumeration.
Field Summary | |
(package private) Hashtable.Entry |
entry
|
protected int |
expectedModCount
The modCount value that the iterator believes that the backing List should have. |
(package private) int |
index
|
(package private) boolean |
iterator
Indicates whether this Enumerator is serving as an Iterator or an Enumeration. |
(package private) Hashtable.Entry |
lastReturned
|
(package private) Hashtable.Entry[] |
table
|
(package private) int |
type
|
Constructor Summary | |
(package private) |
Hashtable.Enumerator(int type,
boolean iterator)
|
Method Summary | |
boolean |
hasMoreElements()
Tests if this enumeration contains more elements. |
boolean |
hasNext()
Returns true if the iteration has more elements. |
Object |
next()
Returns the next element in the iteration. |
Object |
nextElement()
Returns the next element of this enumeration if this enumeration object has at least one more element to provide. |
void |
remove()
Removes from the underlying collection the last element returned by the iterator (optional operation). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
Hashtable.Entry[] table
int index
Hashtable.Entry entry
Hashtable.Entry lastReturned
int type
boolean iterator
protected int expectedModCount
Constructor Detail |
Hashtable.Enumerator(int type, boolean iterator)
Method Detail |
public boolean hasMoreElements()
Enumeration
hasMoreElements
in interface Enumeration
true
if and only if this enumeration object
contains at least one more element to provide;
false
otherwise.public Object nextElement()
Enumeration
nextElement
in interface Enumeration
public boolean hasNext()
Iterator
hasNext
in interface Iterator
public Object next()
Iterator
next
in interface Iterator
public void remove()
Iterator
remove
in interface Iterator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |