|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object QueueList
public class QueueList
Implements a simple queue using a list
Constructor Summary | |
---|---|
QueueList()
No argument constructor |
Method Summary | |
---|---|
boolean |
empty()
Empty? |
static void |
main(String[] args)
Main method for testing |
Object |
peek()
Peek at, but don't remove, top (first) 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 |
Constructor Detail |
---|
public QueueList()
Method Detail |
---|
public void push(Object element)
element
- the element to add to the queuepublic Object peek()
public Object pop()
public int size()
public boolean empty()
public static void main(String[] args)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |