public interface BoundedQueue<E>
Modifier and Type | Method and Description |
---|---|
int |
capacity()
Reports the capacity of this bounded queue.
|
void |
insert(E x)
Inserts a new entry onto the queue.
|
boolean |
isEmpty()
Reports whether the queue is currently empty without changing it.
|
E |
peek()
Reports the element at the front of the queue without changing it.
|
E |
remove()
Removes an element from the front of the queue and reports it.
|
void insert(E x) throws QueueFullException
x
- the object to be inserted onto the queueQueueFullException
- if the queue is already full
E peek()
java.util.NoSuchElementException
- if the queue is empty
E remove()
java.util.NoSuchElementException
- if the queue is already empty
boolean isEmpty()
int capacity()