|
|||||||||
| Home >> All >> java >> [ util overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.util
Class Hashtable.EntryIterator

java.lang.Objectjava.util.Hashtable.EntryIterator
- All Implemented Interfaces:
- Iterator
- Direct Known Subclasses:
- Hashtable.KeyIterator, Hashtable.ValueIterator
- Enclosing class:
- Hashtable
- private class Hashtable.EntryIterator
- extends java.lang.Object
- implements Iterator
- extends java.lang.Object
A class which implements the Iterator interface and is used for iterating over Hashtables. This implementation iterates entries. Subclasses are used to iterate key and values. It also allows the removal of elements, as per the Javasoft spec. Note that it is not synchronized; this is a performance enhancer since it is never exposed externally and is only used within synchronized blocks above.
| Field Summary | |
(package private) int |
count
The number of elements remaining to be returned by next(). |
(package private) int |
idx
Current index in the physical hash table. |
(package private) int |
knownMod
The number of modifications to the backing Hashtable that we know about. |
(package private) Hashtable.HashEntry |
last
The last Entry returned by a next() call. |
(package private) Hashtable.HashEntry |
next
The next entry that should be returned by next(). |
| Constructor Summary | |
(package private) |
Hashtable.EntryIterator()
Construct a new EtryIterator |
| Method Summary | |
boolean |
hasNext()
Returns true if the Iterator has more elements. |
java.lang.Object |
next()
Returns the next element in the Iterator's sequential view. |
void |
remove()
Removes from the backing Hashtable the last element which was fetched with the next() method. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
knownMod
int knownMod
- The number of modifications to the backing Hashtable that we know about.
count
int count
- The number of elements remaining to be returned by next().
idx
int idx
- Current index in the physical hash table.
last
Hashtable.HashEntry last
- The last Entry returned by a next() call.
next
Hashtable.HashEntry next
- The next entry that should be returned by next(). It is set to something
if we're iterating through a bucket that contains multiple linked
entries. It is null if next() needs to find a new bucket.
| Constructor Detail |
Hashtable.EntryIterator
Hashtable.EntryIterator()
- Construct a new EtryIterator
| Method Detail |
hasNext
public boolean hasNext()
next
public java.lang.Object next()
remove
public void remove()
- Removes from the backing Hashtable the last element which was fetched
with the
next()method.
|
|||||||||
| Home >> All >> java >> [ util overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
java.util.Hashtable.EntryIterator