|
j3d.org Code | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.j3d.util.Queue
public class Queue
Simple 'First In First Out' (FIFO) queue. Backend is implemented with a Collections LinkedList.
This simple queue does not block if you request an item. If nothing is in the queue then it just returns you a null value.
Taken from the VLC common code library http://www.vlc.com.au/common/ This softare is released under the GNU LGPL
LinkedList
Constructor Summary | |
---|---|
Queue()
Constructor. |
Method Summary | |
---|---|
void |
add(java.lang.Object o)
Add an element to the end of the queue. |
void |
clear()
Remove all elements in the queue. |
java.lang.Object |
getNext()
Return the next element from the front and remove it from the queue. |
boolean |
hasNext()
Check if queue has more elements. |
java.lang.Object |
peekNext()
Return the next element from the front of the queue. |
void |
remove(java.lang.Object obj)
Remove the given item from the list. |
int |
size()
Return the number of elements in the queue. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Queue()
Method Detail |
---|
public void add(java.lang.Object o)
o
- Element to add.public java.lang.Object getNext()
public java.lang.Object peekNext()
public boolean hasNext()
public void remove(java.lang.Object obj)
obj
- The object to removepublic int size()
public void clear()
|
j3d.org Code | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |