Class WeakHashMapSafeReadLock.HashIterator<T>
- java.lang.Object
-
- org.glassfish.pfl.basic.concurrent.WeakHashMapSafeReadLock.HashIterator<T>
-
- All Implemented Interfaces:
java.util.Iterator<T>
- Direct Known Subclasses:
WeakHashMapSafeReadLock.EntryIterator
,WeakHashMapSafeReadLock.KeyIterator
,WeakHashMapSafeReadLock.ValueIterator
- Enclosing class:
- WeakHashMapSafeReadLock<K,V>
private abstract class WeakHashMapSafeReadLock.HashIterator<T> extends java.lang.Object implements java.util.Iterator<T>
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.lang.Object
currentKey
Strong reference needed to avoid disappearance of key between nextEntry() and any use of the entry(package private) WeakHashMapSafeReadLock.Entry<K,V>
entry
(package private) int
expectedModCount
(package private) int
index
(package private) WeakHashMapSafeReadLock.Entry<K,V>
lastReturned
(package private) java.lang.Object
nextKey
Strong reference needed to avoid disappearance of key between hasNext and next
-
Constructor Summary
Constructors Constructor Description HashIterator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
protected WeakHashMapSafeReadLock.Entry<K,V>
nextEntry()
The common parts of next() across different types of iteratorsvoid
remove()
-
-
-
Field Detail
-
index
int index
-
entry
WeakHashMapSafeReadLock.Entry<K,V> entry
-
lastReturned
WeakHashMapSafeReadLock.Entry<K,V> lastReturned
-
expectedModCount
int expectedModCount
-
nextKey
java.lang.Object nextKey
Strong reference needed to avoid disappearance of key between hasNext and next
-
currentKey
java.lang.Object currentKey
Strong reference needed to avoid disappearance of key between nextEntry() and any use of the entry
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfacejava.util.Iterator<T>
-
nextEntry
protected WeakHashMapSafeReadLock.Entry<K,V> nextEntry()
The common parts of next() across different types of iterators
-
remove
public void remove()
- Specified by:
remove
in interfacejava.util.Iterator<T>
-
-