|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectchoco.prop.VarEventQueue
public class VarEventQueue
| Field Summary | |
|---|---|
protected PropagationEvent |
lastPopped
The last popped var (may be useful for flushing popping events). |
protected PriorityQueue |
queue
A priority queue with all the var. |
| Constructor Summary | |
|---|---|
VarEventQueue()
|
|
| Method Summary | |
|---|---|
void |
flushEventQueue()
Removes all the events (including the popping one). |
PropagationEvent |
get(int idx)
returns the i-th pending event in the queue |
boolean |
isEmpty()
Checks if the queue is empty. |
PropagationEvent |
popEvent()
Pops an event to propagate. |
void |
propagateOneEvent()
Propagates one single event from the queue (usefull for tracing) |
void |
propagateSomeEvents()
Propagates some events: in fact all the events of the queue, since there are the most important events. |
boolean |
pushEvent(PropagationEvent event)
Adds an event to the queue. |
void |
remove(PropagationEvent event)
Removes an event. |
int |
size()
returns the number of pending events in the queue |
void |
updatePriority(PropagationEvent event)
Updates the priority level of an event (after adding a basic var). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected PriorityQueue queue
protected PropagationEvent lastPopped
| Constructor Detail |
|---|
public VarEventQueue()
| Method Detail |
|---|
public boolean isEmpty()
isEmpty in interface EventQueue
public void propagateSomeEvents()
throws ContradictionException
propagateSomeEvents in interface EventQueueContradictionException
public void propagateOneEvent()
throws ContradictionException
propagateOneEvent in interface EventQueueContradictionExceptionpublic PropagationEvent popEvent()
popEvent in interface EventQueuepublic boolean pushEvent(PropagationEvent event)
pushEvent in interface EventQueuepublic void updatePriority(PropagationEvent event)
public void flushEventQueue()
flushEventQueue in interface EventQueuepublic void remove(PropagationEvent event)
remove in interface EventQueuepublic int size()
EventQueue
size in interface EventQueuepublic PropagationEvent get(int idx)
EventQueue
get in interface EventQueueidx - the index of the event
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||