|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ws4d.java.structures.Queue
public class Queue
Simple Queue. Thread safe!?! ;-)
Constructor Summary | |
---|---|
Queue()
Create a new fine queue. |
Method Summary | |
---|---|
java.lang.Object |
checkFirst()
Returns the first element of this queue WITHOUT removing it! |
void |
clear()
Removes all entries from this queue. |
void |
enqueue(java.lang.Object o)
Enqueues element into this queue. |
void |
enqueueAtBeginning(java.lang.Object o)
Adds elements to this queue, but the element will be set on the beginning of the queue. |
java.lang.Object |
get()
Returns the first element of this queue. |
boolean |
isEmpty()
Tests that this queue has no components. |
Iterator |
iterator()
Returns an iterator for this queue. |
int |
size()
Returns the number of components in this queue. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Queue()
Method Detail |
---|
public boolean isEmpty()
true
if and only if this queue has no components,
that is, its size is zero; false
otherwise.public void enqueue(java.lang.Object o)
o
- element to enqueue.public void enqueueAtBeginning(java.lang.Object o)
o
- element to enqueue.public java.lang.Object get()
public java.lang.Object checkFirst()
public void clear()
public Iterator iterator()
This iterator allows to access every item inside this queue and supports the remove method.
public int size()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |