public interface Queue
| Modifier and Type | Method and Description |
|---|---|
Object |
dequeue()
Dequeues an object from the queue.
|
void |
enqueue(Object obj)
Enqueues an object to the queue.
|
boolean |
isEmpty()
Checks is the queue is empty or not.
|
int |
size()
Returns the number of objects in the queue.
|
int size()
boolean isEmpty()
true if the queue is empty, else falsevoid enqueue(Object obj)
obj - the object to enqueueObject dequeue()
null if the queue is emptyCopyright © 2005–2020. All rights reserved.