Files
uni/second/semester2/CT2109/Assignments/Assignment-03/code/Queue.java
2023-12-07 01:19:12 +00:00

14 lines
480 B
Java

/*
* Abstract Queue interface
*/
public interface Queue {
// most important methods
public void enqueue(Object n); // add an object at the rear of the queue
public Object dequeue(); // remove an object from the front of the queue
// others
public boolean isEmpty(); // true if queue is empty
public boolean isFull(); // true if queue is full (if it has limited storage)
public Object front(); // examine front object on queue without removing it
}