public class Queue
extends java.lang.Object
Constructor and Description |
---|
Queue()
Creates an empty queue.
|
Modifier and Type | Method and Description |
---|---|
void |
dequeue()
The object in front of the queue is removed (dequeued) from the queue.
|
void |
enqueue(java.lang.Object object)
Appends (enqueues) a new object to the end of the queue.
|
java.lang.Object |
front()
Returns the object in front of the queue.
|
boolean |
isEmpty()
Returns whether the queue is empty.
|
public boolean isEmpty()
public void enqueue(java.lang.Object object)
object
- any object.public void dequeue()
public java.lang.Object front()