Class Queue

java.lang.Object
  |
  +--Queue

public class Queue
extends java.lang.Object

Queue.java - a queue of Objects


Constructor Summary
Queue()
           
 
Method Summary
 java.lang.Object getFront()
          getFront - Remove and return the front item of the queue.
 void insert(java.lang.Object item)
          insert - Insert the given item in the queue rear.
 boolean isEmpty()
          isEmpty - Return whether or not the Queue is empty
 java.lang.String toString()
          toString - Return a String representation of the queue.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Queue

public Queue()
Method Detail

isEmpty

public boolean isEmpty()
isEmpty - Return whether or not the Queue is empty
Returns:
a boolean value - whether or not the Queue is empty

insert

public void insert(java.lang.Object item)
insert - Insert the given item in the queue rear.
Parameters:
item - an Object value

getFront

public java.lang.Object getFront()
getFront - Remove and return the front item of the queue.
Returns:
an Object value

toString

public java.lang.String toString()
toString - Return a String representation of the queue.
Overrides:
toString in class java.lang.Object
Returns:
a String value