package  csc241.samples.Queue;

/** ~mohammad/public_html/classes/csc241/Queue/Queue.java
   This is an ADT for Queue class.  A Queue holds objects.
   There is no code, private variables, or constructors 
   designed for Queue as it is an Interface.  We are postponing 
   its implementation, so that we could have
   an array version and a linked list version. Notice that there 
   is no constructor and instead of {}
   for the methods with simply have ';'.
**/
public interface Queue {

  /** 
      return true if queue is empty, otherwise, return false
  **/
  public boolean empty();

  /** 
      return true if queue is full, otherwise, return false
  **/
  public boolean full();

  /** 
      add an element to the back of the queue.  <br>
      x - the Object to be added  <br>
      @exception - queueException if queue is full
  **/
  public void enqueue(Object x)  throws queueException;

  /** 
      remove an element from the front of the queue.    <br>
      @exception - queueException if queue is empty.
  **/
  public void dequeue()  throws queueException;

  /** 
      return value - the object in front of the queue; null if
      queue is empty.
  **/
  public Object peek();
}



