Created
April 15, 2010 01:47
-
-
Save damog/366587 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//******************************************************************** | |
// QueueADT.java Authors: Lewis/Chase | |
// | |
// Defines the interface to a queue collection. | |
//******************************************************************** | |
package jss2; | |
public interface QueueADT<T> | |
{ | |
// Adds one element to the rear of the queue | |
public void enqueue (T element); | |
// Removes and returns the element at the front of the queue | |
public T dequeue(); | |
// Returns without removing the element at the front of the queue | |
public T first(); | |
// Returns true if the queue contains no elements | |
public boolean isEmpty(); | |
// Returns the number of elements in the queue | |
public int size(); | |
// Returns a string representation of the queue | |
public String toString(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment