Package org.drools.core.util
Class ArrayQueue<T extends Queue.QueueEntry>
- java.lang.Object
-
- org.drools.core.util.ArrayQueue<T>
-
- All Implemented Interfaces:
java.io.Externalizable
,java.io.Serializable
,Queue<T>
public class ArrayQueue<T extends Queue.QueueEntry> extends java.lang.Object implements Queue<T>, java.io.Externalizable
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.drools.core.util.Queue
Queue.QueueEntry
-
-
Constructor Summary
Constructors Constructor Description ArrayQueue()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
T
dequeue()
void
dequeue(T activation)
void
enqueue(T activation)
java.util.Collection<T>
getAll()
boolean
isEmpty()
T
peek()
void
readExternal(java.io.ObjectInput in)
int
size()
void
writeExternal(java.io.ObjectOutput out)
-
-
-
Method Detail
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
- Specified by:
writeExternal
in interfacejava.io.Externalizable
- Throws:
java.io.IOException
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
- Specified by:
readExternal
in interfacejava.io.Externalizable
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
enqueue
public void enqueue(T activation)
- Specified by:
enqueue
in interfaceQueue<T extends Queue.QueueEntry>
-
dequeue
public T dequeue()
- Specified by:
dequeue
in interfaceQueue<T extends Queue.QueueEntry>
-
dequeue
public void dequeue(T activation)
- Specified by:
dequeue
in interfaceQueue<T extends Queue.QueueEntry>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceQueue<T extends Queue.QueueEntry>
-
clear
public void clear()
- Specified by:
clear
in interfaceQueue<T extends Queue.QueueEntry>
-
getAll
public java.util.Collection<T> getAll()
- Specified by:
getAll
in interfaceQueue<T extends Queue.QueueEntry>
-
size
public int size()
- Specified by:
size
in interfaceQueue<T extends Queue.QueueEntry>
-
peek
public T peek()
- Specified by:
peek
in interfaceQueue<T extends Queue.QueueEntry>
-
-