java.util
Class Hashtable.Enumerator
java.lang.Object
|
+--java.util.Hashtable.Enumerator
- private class Hashtable.Enumerator
- extends Object
- implements Enumeration, Iterator
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.
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
table
Hashtable.Entry[] table
index
int index
entry
Hashtable.Entry entry
lastReturned
Hashtable.Entry lastReturned
type
int type
iterator
boolean iterator
- Indicates whether this Enumerator is serving as an Iterator
or an Enumeration. (true -> Iterator).
expectedModCount
private int expectedModCount
- The modCount value that the iterator believes that the backing
List should have. If this expectation is violated, the iterator
has detected concurrent modification.
Hashtable.Enumerator
Hashtable.Enumerator(int type,
boolean iterator)
hasMoreElements
public boolean hasMoreElements()
- Specified by:
- hasMoreElements in interface Enumeration
nextElement
public Object nextElement()
- Specified by:
- nextElement in interface Enumeration
hasNext
public boolean hasNext()
- Specified by:
- hasNext in interface Iterator
next
public Object next()
- Specified by:
- next in interface Iterator
remove
public void remove()
- Specified by:
- remove in interface Iterator