private class MinMaxPriorityQueue.QueueIterator
extends java.lang.Object
implements java.util.Iterator<E>
| Modifier and Type | Field and 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 |
| Modifier | Constructor and Description |
|---|---|
private |
QueueIterator() |
| Modifier and Type | Method and 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 after
c that is not in
skipMe and returns size() if there is no such element. |
void |
remove() |
(package private) boolean |
removeExact(java.lang.Object target) |
private int cursor
private int expectedModCount
private java.util.Queue<E> forgetMeNot
private java.util.List<E> skipMe
private E lastFromForgetMeNot
private boolean canRemove
public boolean hasNext()
hasNext in interface java.util.Iterator<E>public void remove()
remove in interface java.util.Iterator<E>boolean removeExact(java.lang.Object target)
void checkModCount()
private int nextNotInSkipMe(int c)
c that is not in
skipMe and returns size() if there is no such element.