Package com.google.common.collect
Class MinMaxPriorityQueue.QueueIterator
java.lang.Object
com.google.common.collect.MinMaxPriorityQueue.QueueIterator
- All Implemented Interfaces:
Iterator<E>
- Enclosing class:
MinMaxPriorityQueue<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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
private boolean
foundAndRemovedExactReference
(Iterable<E> elements, E target) Returns true if an exact reference (==) was found and removed from the supplied iterable.boolean
hasNext()
next()
private void
nextNotInSkipMe
(int c) Advances nextCursor to the index of the first element afterc
that is not inskipMe
and returnssize()
if there is no such element.void
remove()
private boolean
removeExact
(Object target) Removes only this exact instance, not others that are equals()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
-
cursor
private int cursor -
nextCursor
private int nextCursor -
expectedModCount
private int expectedModCount -
forgetMeNot
-
skipMe
-
lastFromForgetMeNot
-
canRemove
private boolean canRemove
-
-
Constructor Details
-
QueueIterator
private QueueIterator()
-
-
Method Details
-
hasNext
public boolean hasNext() -
next
-
remove
public void remove() -
foundAndRemovedExactReference
Returns true if an exact reference (==) was found and removed from the supplied iterable. -
removeExact
Removes only this exact instance, not others that are equals() -
checkModCount
private void checkModCount() -
nextNotInSkipMe
private void nextNotInSkipMe(int c) Advances nextCursor to the index of the first element afterc
that is not inskipMe
and returnssize()
if there is no such element.
-