package rd222dv_assign2.Queues;
import java.util.Iterator;
/**
* An interface representing a simple Queue. This interface defines the required
* functionality for all Queue implementations. It provides support
* for accessing (enqueue, dequeue, first, last) at the required position in the
* list. It also contains basic support for sequential access of the whole
* content (i.e., iterators).
* Inserts Object element at the last
* position of the queue. For removing elements from the queue they can be
* dequeued, and the element at the first position will be removed
* Illegal accesses (outside current range) should throw an unchecked exception of type
* IndexOutOfBoundsException.
*
* Currently available Queue implementations in the
* linked package are:
*
Queue outside current range
* [0, size].
*/
public Object dequeue(); // return and remove first element.
/**
* Returns the first element in the Queue List without removing it, if there
* are no elements it throws an exception
*
* @return return (without removing) first element
* @throws IndexOutOfBoundsException
* if Queue outside current range
* [0, size].
*/
public Object first(); // return (without removing) first element
/**
* Returns the last element in the Queue List without removing it, if there
* are no elements it throws an exception
*
* @return return (without removing) last element
* @throws IndexOutOfBoundsException
* if Queue outside current range
* [0, size].
*/
public Object last(); // return (without removing) last element
/**
* Returns a string representation of the current list content separated
* with commas.
*
*
* @return string representation of the content.
*/
public String toString(); // return a string representation of the queue
// content
/**
*Returns an iterator that iterates over the Objects in first in first out order
* @return an iterator that iterates over the Objects in first in first out order
*/
public Iterator