|
Knopflerfish OSGi 2.4.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.Vector
org.knopflerfish.util.Queue
public class Queue
The Queue
class represents a first-in-first-out (FIFO) queue
of objects.
Field Summary |
---|
Fields inherited from class java.util.Vector |
---|
capacityIncrement, elementCount, elementData |
Fields inherited from class java.util.AbstractList |
---|
modCount |
Constructor Summary | |
---|---|
Queue(int size)
* Constructs an Queue with the specifies maximum size. |
Method Summary | |
---|---|
void |
close()
* Closes the queue, i.e. |
void |
insert(java.lang.Object item)
* Inserts an item into the queue. |
void |
insertFirst(java.lang.Object item)
* Inserts an item first into the queue. |
java.lang.Object |
remove()
* Removes and returns the first object in the queue. |
java.lang.Object |
removeWait(float timeout)
* Removes and returns the first item in the queue. |
Methods inherited from class java.util.Vector |
---|
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize |
Methods inherited from class java.util.AbstractList |
---|
iterator, listIterator, listIterator |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
---|
iterator, listIterator, listIterator |
Constructor Detail |
---|
public Queue(int size)
size
- maximum queue size.Method Detail |
---|
public void insert(java.lang.Object item) throws java.lang.IndexOutOfBoundsException
remove
, one of them is unblocked. * *
item
- the item to be inserted. *
java.lang.IndexOutOfBoundsException
- if maximum queue size is reached.public void insertFirst(java.lang.Object item)
remove
, one of them is unblocked. * *
item
- the item to be inserted.public java.lang.Object removeWait(float timeout)
timeout
- timeout in seconds. *
null
if a *
timeout occurred. To distinguish timeouts, null
*
items should not be inserted in the queue.public java.lang.Object remove()
remove(float timeout)
but this function * blocks forever. * *
public void close()
|
Knopflerfish OSGi 2.4.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |