Module org.eclipse.persistence.core
Class AbstractIdentityMapEnumeration<T>
java.lang.Object
org.eclipse.persistence.internal.identitymaps.AbstractIdentityMapEnumeration<T>
- Type Parameters:
T- type of iteratedCacheKeycontent
- 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
ConstructorsModifierConstructorDescriptionprotectedAbstractIdentityMapEnumeration(Collection<CacheKey> keys, boolean shouldCheckReadLocks) Creates an instance ofCacheKeycontent enumeration. -
Method Summary
Modifier and TypeMethodDescriptionprotected CacheKeyGet next element ofCacheKeyinstances enumeration if this enumeration object has at least one more element to provide.booleanCheck whether this enumeration contains more elements.abstract TGet next element ofCacheKeycontent 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, waitMethods inherited from interface java.util.Enumeration
asIterator
-
Field Details
-
cacheKeysIterator
CacheKeyinstances iterator. -
nextKey
Next key to be returned. -
shouldCheckReadLocks
protected boolean shouldCheckReadLocksValue oftrueif readLocks should be checked or false otherwise.
-
-
Constructor Details
-
AbstractIdentityMapEnumeration
Creates an instance ofCacheKeycontent enumeration.- Parameters:
keys-CollectionofCacheKeyinstances to be iteratedshouldCheckReadLocks- value oftrueif read lock on theCacheKeyinstances should be checked orfalseotherwise
-
-
Method Details
-
hasMoreElements
public boolean hasMoreElements()Check whether this enumeration contains more elements.- Specified by:
hasMoreElementsin interfaceEnumeration<T>- Returns:
- value of
trueif this enumeration object contains at least one more element to provide orfalseotherwise
-
nextElement
Get next element ofCacheKeycontent 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:
nextElementin interfaceEnumeration<T>- Returns:
- the next element of this enumeration
- Throws:
NoSuchElementException- if no more elements exist
-
getNextElement
Get next element ofCacheKeyinstances 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
-