|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwriteattributes.AddressEdit.PriorityQueue.PQIterator
private class AddressEdit.PriorityQueue.PQIterator
Priority queue iterator.
An instance of this iterator can work in either the upward or downward direction. An upward iterator starts at queue element zero and returns queue elements at increasing indices. A downward iterator starts with the largest index and moves to lower indices.
Field Summary | |
---|---|
private int |
current
|
private int |
end
|
private int |
generation
|
private int |
increment
|
private AddressEdit.PriorityQueue |
queue
|
private int |
start
|
Constructor Summary | |
---|---|
AddressEdit.PriorityQueue.PQIterator(int direction,
AddressEdit.PriorityQueue queue)
Constructor. |
Method Summary | |
---|---|
boolean |
hasNext()
Is there another element to read? |
java.lang.Object |
next()
Return next element, moving in desired direction. |
void |
remove()
Remove an element from the underlying collection. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final AddressEdit.PriorityQueue queue
private final int start
private final int end
private final int increment
private final int generation
private int current
Constructor Detail |
---|
public AddressEdit.PriorityQueue.PQIterator(int direction, AddressEdit.PriorityQueue queue)
Create an up iterator if the argument is greater than or equal to zero, otherwise create a down iterator.
direction
- negative for down, otherwise upqueue
- the priority queue to walk
java.lang.IllegalArgumentException
- if queue is nullMethod Detail |
---|
public boolean hasNext()
hasNext
in interface java.util.Iterator
next()
won't throw an exception
java.util.ConcurrentModificationException
- if queue has been modified underneath iteratorpublic java.lang.Object next()
next
in interface java.util.Iterator
java.util.ConcurrentModificationException
- if queue has been modified underneath iteratorpublic void remove()
Not supported.
remove
in interface java.util.Iterator
java.lang.UnsupportedOperationException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |