|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectQueue2
public class Queue2
Implements a simple queue using an array
Constructor Summary | |
---|---|
Queue2()
No argument constructor |
Method Summary | |
---|---|
java.lang.Object |
peek()
Peek at, but don't remove, the head of the queue |
java.lang.Object |
pop()
Pop an object from the Queue |
void |
push(java.lang.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 |
Constructor Detail |
---|
public Queue2()
Method Detail |
---|
public void push(java.lang.Object element)
element
- the element to add to the queuepublic java.lang.Object peek()
public java.lang.Object pop()
public int size()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |