|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.umk.mat.merdacz.utils.Queue
Field Summary | |
private java.util.LinkedList |
items
|
Constructor Summary | |
Queue()
Creats an empty queue |
Method Summary | |
void |
clear()
Removes all elements at the queue. |
java.lang.Object |
dequeue()
Removes the element at the top of the queue. |
boolean |
empty()
|
java.lang.Object |
enqueue(java.lang.Object element)
Inserts a new element at the rear of the queue. |
java.lang.Object |
front()
Inspects the element at the top of the queue without removing it. |
int |
size()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.util.LinkedList items
Constructor Detail |
public Queue()
Method Detail |
public java.lang.Object enqueue(java.lang.Object element)
element
- element to be inserted.public java.lang.Object dequeue() throws EmptyQueueException
EmptyQueueException
EmptyQueueException
- if the queue is empty.public java.lang.Object front() throws EmptyQueueException
EmptyQueueException
EmptyQueueException
- if the queue is empty.public int size()
public boolean empty()
public void clear()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |