|
|
|||||||||||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.lmu.ifi.dbs.elki.utilities.Queue<O>
public class Queue<O>
Provides a simple queue with a linked list data structure.
Nested Class Summary | |
---|---|
(package private) class |
Queue.QueueElement
An element in the queue: holds the underlying objcet and the next element in the queue. |
Field Summary | |
---|---|
private Queue.QueueElement |
first
The first of this queue, null if the queue is empty. |
private Queue.QueueElement |
last
The last element of this queue. |
Constructor Summary | |
---|---|
Queue()
|
Method Summary | |
---|---|
O |
dequeue()
Removes the first object from the queue and returns it. |
void |
enqueue(O object)
Appends the specified object to the end of the queue. |
O |
firstObject()
Returns the first object of the queue, but does not remove it. |
boolean |
isEmpty()
Returns true, if this queue is empty, false otherwise. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private Queue.QueueElement first
private Queue.QueueElement last
Constructor Detail |
---|
public Queue()
Method Detail |
---|
public void enqueue(O object)
object
- the object to be enqueuedpublic O dequeue()
NoSuchElementException
- if the queue is emptypublic O firstObject()
public boolean isEmpty()
|
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |