Module org.eclipse.persistence.core
Class AbstractIdentityMapEnumeration<T>
java.lang.Object
org.eclipse.persistence.internal.identitymaps.AbstractIdentityMapEnumeration<T>
- Type Parameters:
T
- type of iteratedCacheKey
content
- All Implemented Interfaces:
Enumeration<T>
- Direct Known Subclasses:
IdentityMapEnumeration
,IdentityMapKeyEnumeration
Abstract
Enumeration
interface implementation for IdentityMap
interface. Allows to iterate over CacheKey
instances stored in the map.-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractIdentityMapEnumeration
(Collection<CacheKey> keys, boolean shouldCheckReadLocks) Creates an instance ofCacheKey
content enumeration. -
Method Summary
Modifier and TypeMethodDescriptionprotected CacheKey
Get next element ofCacheKey
instances enumeration if this enumeration object has at least one more element to provide.boolean
Check whether this enumeration contains more elements.abstract T
Get next element ofCacheKey
content enumeration if this enumeration object has at least one more element to provide.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Enumeration
asIterator
-
Field Details
-
cacheKeysIterator
CacheKey
instances iterator. -
nextKey
Next key to be returned. -
shouldCheckReadLocks
protected boolean shouldCheckReadLocksValue oftrue
if readLocks should be checked or false otherwise.
-
-
Constructor Details
-
AbstractIdentityMapEnumeration
Creates an instance ofCacheKey
content enumeration.- Parameters:
keys
-Collection
ofCacheKey
instances to be iteratedshouldCheckReadLocks
- value oftrue
if read lock on theCacheKey
instances should be checked orfalse
otherwise
-
-
Method Details
-
hasMoreElements
public boolean hasMoreElements()Check whether this enumeration contains more elements.- Specified by:
hasMoreElements
in interfaceEnumeration<T>
- Returns:
- value of
true
if this enumeration object contains at least one more element to provide orfalse
otherwise
-
nextElement
Get next element ofCacheKey
content enumeration if this enumeration object has at least one more element to provide. It it expected that this method will be implemented usinggetNextElement()
in child classes.- Specified by:
nextElement
in interfaceEnumeration<T>
- Returns:
- the next element of this enumeration
- Throws:
NoSuchElementException
- if no more elements exist
-
getNextElement
Get next element ofCacheKey
instances enumeration if this enumeration object has at least one more element to provide.- Returns:
- the next element of this enumeration
- Throws:
NoSuchElementException
- if no more elements exist
-