package asd_library.queue;

/**
 * The abstract data type queue.
 */

public interface Queue_adt {

  /**
   * Stores an item at the queue end.
   * @param el the object to store.
   */
  void enqueue(Object el);

  /**
   * Retrieves the item from the queue head and removes it.
   * @return the object deleted from the queue.
   */
  Object dequeue();

  /**
   * Retrieves the item from the queue head but doesn't remove it.
   * @return the object at the head of the queue.
   */
  Object firstEl();

  /**
   * Verifies if the queue is empty.
   * @return true if the queue is empty, false otherwise.
   */
  boolean isEmpty();

}



 


Bacheca di Algoritmi e Strutture Dati a.a. 2007-08 - canale A - L

forum del corso

ultima modifica: 03/04/2008 23.35
by FdA