Package com.google.common.collect
Class MinMaxPriorityQueue.QueueIterator
- java.lang.Object
-
- com.google.common.collect.MinMaxPriorityQueue.QueueIterator
-
- All Implemented Interfaces:
java.util.Iterator<E>
- Enclosing class:
- MinMaxPriorityQueue<E>
private class MinMaxPriorityQueue.QueueIterator extends java.lang.Object implements java.util.Iterator<E>
Iterates the elements of the queue in no particular order. If the underlying queue is modified during iteration an exception will be thrown.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
canRemove
private int
cursor
private int
expectedModCount
private java.util.Queue<E>
forgetMeNot
private E
lastFromForgetMeNot
private java.util.List<E>
skipMe
-
Constructor Summary
Constructors Modifier Constructor Description private
QueueIterator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
checkModCount()
private boolean
containsExact(java.lang.Iterable<E> elements, E target)
boolean
hasNext()
E
next()
private int
nextNotInSkipMe(int c)
Returns the index of the first element afterc
that is not inskipMe
and returnssize()
if there is no such element.void
remove()
(package private) boolean
removeExact(java.lang.Object target)
-
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfacejava.util.Iterator<E>
-
remove
public void remove()
- Specified by:
remove
in interfacejava.util.Iterator<E>
-
removeExact
boolean removeExact(java.lang.Object target)
-
checkModCount
void checkModCount()
-
nextNotInSkipMe
private int nextNotInSkipMe(int c)
Returns the index of the first element afterc
that is not inskipMe
and returnssize()
if there is no such element.
-
-