Package com.google.protobuf
Class SmallSortedMap.EntryIterator
- java.lang.Object
-
- com.google.protobuf.SmallSortedMap.EntryIterator
-
- All Implemented Interfaces:
java.util.Iterator<java.util.Map.Entry<K,V>>
- Enclosing class:
- SmallSortedMap<K extends java.lang.Comparable<K>,V>
private class SmallSortedMap.EntryIterator extends java.lang.Object implements java.util.Iterator<java.util.Map.Entry<K,V>>
Iterator implementation that switches from the entry array to the overflow entries appropriately.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Iterator<java.util.Map.Entry<K,V>>
lazyOverflowIterator
private boolean
nextCalledBeforeRemove
private int
pos
-
Constructor Summary
Constructors Modifier Constructor Description private
EntryIterator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.util.Iterator<java.util.Map.Entry<K,V>>
getOverflowIterator()
It is important to create the overflow iterator only after the array entries have been iterated over because the overflow entry set changes when the client calls remove() on the array entries, which invalidates any existing iterators.boolean
hasNext()
java.util.Map.Entry<K,V>
next()
void
remove()
-
-
-
Method Detail
-
hasNext
public boolean hasNext()
-
remove
public void remove()
-
getOverflowIterator
private java.util.Iterator<java.util.Map.Entry<K,V>> getOverflowIterator()
It is important to create the overflow iterator only after the array entries have been iterated over because the overflow entry set changes when the client calls remove() on the array entries, which invalidates any existing iterators.
-
-