public class ArrayObjectQueue<E> extends Object implements ObjectQueue<E>
| Constructor and Description |
|---|
ArrayObjectQueue() |
ArrayObjectQueue(int initialCapacity) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E e) |
void |
clear() |
int |
getCurrentCapacity() |
protected void |
grow() |
boolean |
isEmpty() |
Iterator<E> |
iterator() |
boolean |
offer(E e) |
E |
peek() |
E |
poll() |
void |
process(Processor<E> processor)
call Processor.process(e) on each queued object
This method does not return before the queue is empty, which makes it
suitable for graph traversal.
|
E |
remove() |
int |
size() |
Iterator<E> |
storageIterator() |
public ArrayObjectQueue()
public ArrayObjectQueue(int initialCapacity)
protected void grow()
public boolean isEmpty()
isEmpty in interface ObjectQueue<E>public int getCurrentCapacity()
public int size()
size in interface ObjectQueue<E>public boolean offer(E e)
offer in interface ObjectQueue<E>public boolean add(E e)
add in interface ObjectQueue<E>public E poll()
poll in interface ObjectQueue<E>public E remove() throws NoSuchElementException
remove in interface ObjectQueue<E>NoSuchElementExceptionpublic E peek()
peek in interface ObjectQueue<E>public void clear()
clear in interface ObjectQueue<E>public void process(Processor<E> processor)
process in interface ObjectQueue<E>