Element
- Element typepublic class QueueSynchronized<Element>
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
(package private) static class |
QueueSynchronized.Link<Elt>
Link between tow elements in the queue
Last modification : 25 janv. 2009 Version 0.0.1 |
Modifier and Type | Field and Description |
---|---|
private QueueSynchronized.Link<Element> |
head
Head link
|
private int |
size
Queue size
|
private QueueSynchronized.Link<Element> |
tail
Tail link
|
Constructor and Description |
---|
QueueSynchronized()
Constructs Queue
|
Modifier and Type | Method and Description |
---|---|
void |
inQueue(Element element)
In queue an element
|
boolean |
isEmpty()
Indicates if the queue is empty
|
Element |
lookQueue()
Look the next element in the queue
|
Element |
outQueue()
Out queue element
|
int |
size()
Queue size
|
java.lang.String |
toString()
String representation
|
private QueueSynchronized.Link<Element> head
private int size
private QueueSynchronized.Link<Element> tail
public void inQueue(Element element)
element
- Element to in queuepublic boolean isEmpty()
true
if the queue is emptypublic Element lookQueue()
public Element outQueue()
public int size()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()