|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectQueue
Implements a simple queue
Field Summary | |
LinkedList |
elements
Where we'll store our elements |
Constructor Summary | |
Queue()
|
Method Summary | |
boolean |
empty()
Empty? |
Object |
peek()
Peek at, but don't remove, top of queue |
Object |
pop()
Pop an object from the Queue |
void |
push(Object element)
Push an object onto the Queue |
int |
size()
Return the size of a queue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public LinkedList elements
Constructor Detail |
public Queue()
Method Detail |
public void push(Object element)
public Object peek()
public Object pop()
public int size()
public boolean empty()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |