Class Queue2

java.lang.Object
  extended byQueue2

public class Queue2
extends Object

Implements a simple queue


Constructor Summary
Queue2()
           
 
Method Summary
 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
 

Constructor Detail

Queue2

public Queue2()
Method Detail

push

public void push(Object element)
Push an object onto the Queue


peek

public Object peek()
Peek at, but don't remove, top of queue


pop

public Object pop()
Pop an object from the Queue


size

public int size()
Return the size of a queue