public class BoundedQueue<E> extends java.lang.Object
| Constructor and Description |
|---|
BoundedQueue(int capacity)
Constructs an empty queue.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(E newValue)
Appends an object at the tail.
|
boolean |
isEmpty() |
boolean |
isFull() |
E |
remove()
Removes the object at the head.
|
void |
setDebug(boolean newValue) |
public BoundedQueue(int capacity)
capacity - the maximum capacity of the queuepublic E remove()
Precondition: !isEmpty()
public void add(E newValue)
newValue - the object to be appended
Precondition: !isFull();
public boolean isFull()
public boolean isEmpty()
public void setDebug(boolean newValue)