// An interface for an Observable queue.
// Barry Cornelius, 19 June 2000
import java.util. Observer;
public interface Queue 
{
   // adds a new element (to the target queue) that is
   // assigned the value pObject, a pointer to some object
   public void add(Object pObject);

   // returns a pointer to the object that is at the first element
   // of the target queue (without removing the element)
   public Object getFirst();

   // returns a pointer to the object that is at the first element
   // of the target queue and removes that element from the queue
   public Object remove();

   // returns the number of elements in the target queue
   public int size();

   // returns the value true if and only if the objects of the 
   // target queue and the queue passed as an argument have
   // the same values in the same order
   public boolean equals(Object pObject);

   // returns a hashcode value for the target queue
   public int hashCode();

   // returns a textual representation of the target queue
   public String toString();

   // adds the object pObserver to the set of observers for the target queue
   public void addObserver(Observer pObserver);
}
