Package org.zkoss.zkex.zul.impl
Class OperationQueue
- java.lang.Object
-
- org.zkoss.zkex.zul.impl.OperationQueue
-
public class OperationQueue extends java.lang.ObjectA queue for storingOperationand is thread-safe. This class is for model sharer developer only, you rarely need to use this class.
Available in ZK PE and ZK EE.
- Since:
- 3.0.0
- Author:
- Dennis.Chen
-
-
Constructor Summary
Constructors Constructor Description OperationQueue()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddListener(OperationQueueListener listener)Add a listener to this queueOperationelement()Get an operation from queue, doesn't remove it.booleanhasElement()Check is there any operation in queue.Operationnext()Get an operation from queue, and then remove it.voidput(Operation op)Put an operation to queuevoidremove()Remove the first operation in queue if exist.voidremoveListener(OperationQueueListener listener)Remove a listener to this queue.
-
-
-
Method Detail
-
addListener
public void addListener(OperationQueueListener listener)
Add a listener to this queue
-
removeListener
public void removeListener(OperationQueueListener listener)
Remove a listener to this queue.
-
put
public void put(Operation op)
Put an operation to queue- Parameters:
op- the operation.
-
element
public Operation element()
Get an operation from queue, doesn't remove it.- Returns:
- the first operation in queue, null if not such operation.
-
hasElement
public boolean hasElement()
Check is there any operation in queue.- Returns:
- true if there exist any operation in queue.
-
next
public Operation next()
Get an operation from queue, and then remove it.- Returns:
- the first operation in queue, null if not such operation.
-
remove
public void remove()
Remove the first operation in queue if exist.
-
-