|
|||||||||
| 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.KeyIterator

java.lang.Objectjava.util.Hashtable.EntryIterator
java.util.Hashtable.KeyIterator
- All Implemented Interfaces:
- Iterator
- Enclosing class:
- Hashtable
- private class Hashtable.KeyIterator
- extends Hashtable.EntryIterator
A class which implements the Iterator interface and is used for iterating over keys in Hashtables.
| 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 | |
private |
Hashtable.KeyIterator()
|
| 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.KeyIterator
private Hashtable.KeyIterator()
| Method Detail |
next
public java.lang.Object next()
- Returns the next element in the Iterator's sequential view.
- Specified by:
nextin interfaceIterator- Overrides:
nextin classHashtable.EntryIterator
hasNext
public boolean hasNext()
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