Package jasima.core.simulation.generic
Class Q<T>
- java.lang.Object
-
- jasima.core.simulation.generic.Q<T>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceQ.QEventstatic classQ.QEventsstatic interfaceQ.QListener<T>
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidenter(Q<SimProcess<?>> q)Tget(int n)intgetCapacity()StringgetName()static voidleave(Q<SimProcess<?>> q)Notifier<Q<T>,Q.QEvent>notifierImpl()intnumAvailable()intnumItems()intnumWaitingPut()intnumWaitingTake()voidput(T t)voidputFront(T t)booleanremove(T t)voidsetCapacity(int newCapacity)voidsetName(String name)Ttake()TtakeLast()StringtoString()static <T> Q.QListener<T>traceQEvents(Q<T> q1)booleantryPut(T t)booleantryPutFront(T t)TtryTake()TtryTakeLast()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jasima.core.util.observer.Notifier
addListener, addListener, addListener, fire, fire, getListener, numListener, removeCurrentListener, removeListener
-
-
-
-
Constructor Detail
-
Q
public Q()
-
Q
public Q(String name)
-
-
Method Detail
-
enter
public static void enter(Q<SimProcess<?>> q) throws SimProcess.MightBlock
- Throws:
SimProcess.MightBlock
-
leave
public static void leave(Q<SimProcess<?>> q)
-
traceQEvents
public static <T> Q.QListener<T> traceQEvents(Q<T> q1)
-
put
public void put(T t) throws SimProcess.MightBlock
- Throws:
SimProcess.MightBlock
-
tryPut
public boolean tryPut(T t)
-
putFront
public void putFront(T t) throws SimProcess.MightBlock
- Throws:
SimProcess.MightBlock
-
tryPutFront
public boolean tryPutFront(T t)
-
take
public T take() throws SimProcess.MightBlock
- Throws:
SimProcess.MightBlock
-
takeLast
public T takeLast() throws SimProcess.MightBlock
- Throws:
SimProcess.MightBlock
-
remove
public boolean remove(T t)
-
numItems
public int numItems()
-
get
public T get(int n)
-
numAvailable
public int numAvailable()
-
numWaitingTake
public int numWaitingTake()
-
numWaitingPut
public int numWaitingPut()
-
getCapacity
public int getCapacity()
-
setCapacity
public void setCapacity(int newCapacity)
-
notifierImpl
public Notifier<Q<T>,Q.QEvent> notifierImpl()
- Specified by:
notifierImplin interfaceNotifier<Q<T>,Q.QEvent>
-
getName
public String getName()
-
setName
public void setName(String name)
-
-