FileDocCategorySizeDatePackage
IdentityHashtableEnumerator.javaAPI DocJava SE 5 API1541Fri Aug 26 14:54:34 BST 2005com.sun.corba.se.impl.util

IdentityHashtableEnumerator

public class IdentityHashtableEnumerator extends Object implements Enumeration
A hashtable enumerator class. This class should remain opaque to the client. It will use the Enumeration interface.

Fields Summary
boolean
keys
int
index
IdentityHashtableEntry[]
table
IdentityHashtableEntry
entry
Constructors Summary
IdentityHashtableEnumerator(IdentityHashtableEntry[] table, boolean keys)

	this.table = table;
	this.keys = keys;
	this.index = table.length;
    
Methods Summary
public booleanhasMoreElements()

	if (entry != null) {
	    return true;
	}
	while (index-- > 0) {
	    if ((entry = table[index]) != null) {
		return true;
	    }
	}
	return false;
public java.lang.ObjectnextElement()

    if (entry == null) {
	while ((index-- > 0) && ((entry = table[index]) == null));
    }
    if (entry != null) {
	    IdentityHashtableEntry e = entry;
	entry = e.next;
	return keys ? e.key : e.value;
    }
	throw new NoSuchElementException("IdentityHashtableEnumerator");