FileDocCategorySizeDatePackage
IdentityMapKeyEnumeration.javaAPI DocGlassfish v2 API3094Tue May 22 16:54:36 BST 2007oracle.toplink.essentials.internal.identitymaps

IdentityMapKeyEnumeration

public class IdentityMapKeyEnumeration extends Object implements Enumeration
Used to allow iterating over a maps cache keys.

Fields Summary
protected FullIdentityMap
map
protected Enumeration
cacheKeysEnum
protected CacheKey
nextKey
Constructors Summary
public IdentityMapKeyEnumeration(FullIdentityMap map)

        this.map = map;
        this.cacheKeysEnum = map.getCacheKeys().elements();
    
Methods Summary
protected oracle.toplink.essentials.internal.identitymaps.CacheKeygetNextCacheKey()

        CacheKey key = null;
        while (cacheKeysEnum.hasMoreElements() && (key == null)) {
            key = (CacheKey)cacheKeysEnum.nextElement();
        }
        return key;
    
public booleanhasMoreElements()

        this.nextKey = getNextCacheKey();
        return this.nextKey != null;
    
public java.lang.ObjectnextElement()

        if (this.nextKey == null) {
            throw new NoSuchElementException("IdentityMapKeyEnumeration nextElement");
        }

        // CR#... Must check the read lock to avoid
        // returning half built objects.
        this.nextKey.checkReadLock();
        return this.nextKey;