|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectQueue<D>
D
- The key of the data to store in a queue.public class Queue<D>
A list-based implementation of a queue, i.e. FIFO-buffer, where all methods need constant time.
Constructor Summary | |
---|---|
Queue()
Create an empty queue. |
Method Summary | |
---|---|
D |
dequeue()
Returns and removes the element at the front of this queue. |
void |
enqueue(D x)
Inserts the given element x at the end of this queue. |
boolean |
isempty()
Checks whether the queue is empty. |
int |
size()
Returns the number of elements in this queue. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Queue()
Method Detail |
---|
public boolean isempty()
public D dequeue()
public void enqueue(D x)
x
- The element to store in this queue.public int size()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |