Package com.google.protobuf
Class SmallSortedMap.DescendingEntryIterator
- java.lang.Object
-
- com.google.protobuf.SmallSortedMap.DescendingEntryIterator
-
- 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.DescendingEntryIterator extends java.lang.Object implements java.util.Iterator<java.util.Map.Entry<K,V>>Reverse 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>>lazyOverflowIteratorprivate intpos
-
Constructor Summary
Constructors Modifier Constructor Description privateDescendingEntryIterator()
-
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.booleanhasNext()java.util.Map.Entry<K,V>next()voidremove()
-
-
-
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.
-
-