public class Queue extends Object implements Serializable
| Constructor and Description |
|---|
Queue()
Creates an empty queue
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears this queue, making it empty.
|
Object |
get()
Gets and removes the item at the beginning of the queue
|
boolean |
isEmpty()
Tests if the queue is empty
|
boolean |
isQueued(Object item)
Tests if the item is in the queue.
|
void |
put(Object item)
Puts an item at the end of the queue.
|
String |
toString()
Returns a String representation of the queue.
|
public void put(Object item)
item - The item to be added at the end of the queuepublic Object get() throws EmptyQueueException
EmptyQueueExceptionpublic boolean isEmpty()
public void clear()
public boolean isQueued(Object item)
Copyright © 2019 JULIE Lab, Germany. All rights reserved.