Package org.copperengine.core.common
Class WfPriorityQueue
- java.lang.Object
-
- org.copperengine.core.common.WfPriorityQueue
-
- All Implemented Interfaces:
java.lang.Iterable<Workflow<?>>
,java.util.Collection<Workflow<?>>
,java.util.Queue<Workflow<?>>
public class WfPriorityQueue extends java.lang.Object implements java.util.Queue<Workflow<?>>
Priority queue forWorkflow
instances. Entries in the queue are ordered using their priority and enqueue timestamp
-
-
Constructor Summary
Constructors Constructor Description WfPriorityQueue()
WfPriorityQueue(int initialSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(Workflow<?> e)
boolean
addAll(java.util.Collection<? extends Workflow<?>> c)
void
clear()
boolean
contains(java.lang.Object o)
boolean
containsAll(java.util.Collection<?> c)
Workflow<?>
element()
boolean
isEmpty()
java.util.Iterator<Workflow<?>>
iterator()
boolean
offer(Workflow<?> e)
Workflow<?>
peek()
Workflow<?>
poll()
Workflow<?>
remove()
boolean
remove(java.lang.Object o)
boolean
removeAll(java.util.Collection<?> c)
boolean
retainAll(java.util.Collection<?> c)
int
size()
java.lang.Object[]
toArray()
<T> T[]
toArray(T[] a)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Method Detail
-
size
public int size()
- Specified by:
size
in interfacejava.util.Collection<Workflow<?>>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfacejava.util.Collection<Workflow<?>>
-
contains
public boolean contains(java.lang.Object o)
- Specified by:
contains
in interfacejava.util.Collection<Workflow<?>>
-
iterator
public java.util.Iterator<Workflow<?>> iterator()
-
toArray
public java.lang.Object[] toArray()
- Specified by:
toArray
in interfacejava.util.Collection<Workflow<?>>
-
toArray
public <T> T[] toArray(T[] a)
- Specified by:
toArray
in interfacejava.util.Collection<Workflow<?>>
-
remove
public boolean remove(java.lang.Object o)
- Specified by:
remove
in interfacejava.util.Collection<Workflow<?>>
-
containsAll
public boolean containsAll(java.util.Collection<?> c)
- Specified by:
containsAll
in interfacejava.util.Collection<Workflow<?>>
-
addAll
public boolean addAll(java.util.Collection<? extends Workflow<?>> c)
- Specified by:
addAll
in interfacejava.util.Collection<Workflow<?>>
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
- Specified by:
removeAll
in interfacejava.util.Collection<Workflow<?>>
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
- Specified by:
retainAll
in interfacejava.util.Collection<Workflow<?>>
-
clear
public void clear()
- Specified by:
clear
in interfacejava.util.Collection<Workflow<?>>
-
add
public boolean add(Workflow<?> e)
-
offer
public boolean offer(Workflow<?> e)
- Specified by:
offer
in interfacejava.util.Queue<Workflow<?>>
-
element
public Workflow<?> element()
- Specified by:
element
in interfacejava.util.Queue<Workflow<?>>
-
-