Package com.google.protobuf
Class SmallSortedMap.DescendingEntryIterator
java.lang.Object
com.google.protobuf.SmallSortedMap.DescendingEntryIterator
- Enclosing class:
SmallSortedMap<K extends Comparable<K>,
V>
private class SmallSortedMap.DescendingEntryIterator
extends Object
implements Iterator<Map.Entry<K,V>>
Reverse Iterator implementation that switches from the entry array to the overflow entries
appropriately.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionIt 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()
next()
void
remove()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
pos
private int pos -
lazyOverflowIterator
-
-
Constructor Details
-
DescendingEntryIterator
private DescendingEntryIterator()
-
-
Method Details
-
hasNext
public boolean hasNext() -
next
-
remove
public void remove() -
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.
-