/**
 * A Queue is a first-in, first-out (FIFO) abstract data type.
 *
 * @author Zach Tomaszewski
 * @param <E>  The data type of elements to be stored in this Queue.
 */
public interface Queue<E> {

  /**
   * Adds the given item to the back of this Queue.
   * When a queue contains only one element, the front and back element
   * are the same object.
   */
  public void offer(E item);

  /**
   * Returns the current front item of this queue.  That item's position
   * in the queue is not affected.
   *
   * @throws IllegalStateException  If this queue is currently empty.
   */
  public E peek();

  /**
   * Removes and returns the current front item of this queue.
   *
   * @throws IllegalStateException  If this queue is currently empty.
   */
  public E poll();

  /**
   * Returns the number of items currently stored in this queue.
   */
  public int size();

}
