|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.epfl.lpd.ids.utils.MyPriorityBlockingQueue<T>
public class MyPriorityBlockingQueue<T>
Class implementing the IBlockingQueue
class. This class is just a wrapper around a PriorityBlockingQueue
Field Summary | |
---|---|
protected PriorityBlockingQueue<T> |
messages
The PriorityBlockingQueue that
contains all the object of this queue. |
Constructor Summary | |
---|---|
MyPriorityBlockingQueue()
Creates a new instance of MyPriorityBlockingQueue, i.e., a new PriorityBlockingQueue |
Method Summary | |
---|---|
T |
get()
This method simply calls the take() method of the
PriorityBlockingQueue . |
void |
put(T obj)
This method simply calls the offer() method of the
PriorityBlockingQueue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected PriorityBlockingQueue<T> messages
PriorityBlockingQueue
that
contains all the object of this queue.
Constructor Detail |
---|
public MyPriorityBlockingQueue()
PriorityBlockingQueue
Method Detail |
---|
public void put(T obj)
offer()
method of the
PriorityBlockingQueue
put
in interface IBlockingQueue<T>
obj
- The object to offer.public T get() throws InterruptedException
take()
method of the
PriorityBlockingQueue
. It returns
the last element of the queue.
get
in interface IBlockingQueue<T>
InterruptedException
- If an exception occurs
while retrieving the last element of this queue.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |