|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.cp.solver.propagation.VariableEventQueue
choco.cp.solver.propagation.ObservableVarEventQueue
public class ObservableVarEventQueue
Field Summary |
---|
Fields inherited from class choco.cp.solver.propagation.VariableEventQueue |
---|
lastPopped, queue |
Fields inherited from interface choco.kernel.solver.propagation.queue.EventQueue |
---|
LOGGER |
Constructor Summary | |
---|---|
ObservableVarEventQueue()
|
Method Summary | |
---|---|
void |
addObserver(IObserver o)
Adds an observer to the set of observers for this object, provided that it is not the same as some observer already in the set. |
void |
clear()
Clear datastructures for safe reuses |
void |
flushEventQueue()
Removes all the events (including the popping one). |
void |
notifyObservers(Object arg)
If this object has changed, as indicated by the hasChanged method, then notify all of its observers
and then call the clearChanged method to indicate
that this object has no longer changed. |
PropagationEvent |
popEvent()
Pops an event to propagate. |
boolean |
pushEvent(PropagationEvent event)
Adds an event to the queue. |
Methods inherited from class choco.cp.solver.propagation.VariableEventQueue |
---|
get, isEmpty, propagateAllEvents, propagateOneEvent, remove, size |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ObservableVarEventQueue()
Method Detail |
---|
public void clear()
clear
in interface EventQueue
clear
in class VariableEventQueue
public PropagationEvent popEvent()
popEvent
in interface EventQueue
popEvent
in class VariableEventQueue
public boolean pushEvent(PropagationEvent event)
pushEvent
in interface EventQueue
pushEvent
in class VariableEventQueue
public void flushEventQueue()
flushEventQueue
in interface EventQueue
flushEventQueue
in class VariableEventQueue
public void addObserver(IObserver o)
addObserver
in interface IObservable
o
- an observer to be added.
NullPointerException
- if the parameter o is null.public void notifyObservers(Object arg)
hasChanged
method, then notify all of its observers
and then call the clearChanged
method to indicate
that this object has no longer changed.
Each observer has its update
method called with two
arguments: this observable object and the arg
argument.
notifyObservers
in interface IObservable
arg
- any object.IObserver.update(choco.IObservable , Object)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |