/* * CS220_Queue_Interface.java * * Created on Jun 4, 2007 * * by Donald Yessick */ /** * CS220_Queue_Interface * @author Donald Yessick * @ */ public interface CS220_Queue_Interface { /** * isEmpty returns the queues status * @return true if the queue has no objects */ boolean isEmpty(); /** * getCount provides the number of elements in the queue * @return number of objects in queue */ int getCount(); /** * enqueue adds an object to end of queue (tail) * @param object */ void enqueue(Object object); /** * dequeue removes an object from the head of the queue * @return the object removed */ Object dequeue(); /** * peek fetches an object from the head of the queue * @return the object at front of the queue */ Object peek(); /** * visit each element using the visitor design pattern * visit * @param v the visitor implementing a visit(object) method */ void visit(CS220_Visitor_Interface v); }