public class QueueReader<E>
extends java.lang.Object
implements java.util.Iterator<E>
| Modifier | Constructor and Description |
|---|---|
protected |
QueueReader(E[] q,
int index) |
| Modifier and Type | Method and Description |
|---|---|
QueueReader<E> |
clone() |
boolean |
hasNext()
Returns true iff there is currently another object in the queue.
|
E |
next()
Returns (and removes) the next object in the queue, or null if there are
none.
|
void |
remove() |
void |
remove(E o)
Removes an element from the underlying queue.
|
protected QueueReader(E[] q, int index)
public E next()
next in interface java.util.Iterator<E>public boolean hasNext()
hasNext in interface java.util.Iterator<E>public void remove(E o)
o - The element to removepublic void remove()
remove in interface java.util.Iterator<E>public QueueReader<E> clone()
clone in class java.lang.Object