choco.visu.searchloop
Class ObservableStepSearchLoop

java.lang.Object
  extended by choco.kernel.solver.search.AbstractSearchLoop
      extended by choco.visu.searchloop.ObservableStepSearchLoop
All Implemented Interfaces:
IObservable, ISearchLoop, IObservableStepSearchLoop

public class ObservableStepSearchLoop
extends AbstractSearchLoop
implements IObservableStepSearchLoop


Nested Class Summary
 
Nested classes/interfaces inherited from interface choco.visu.searchloop.IObservableStepSearchLoop
IObservableStepSearchLoop.Step
 
Field Summary
 State state
           
 
Fields inherited from class choco.kernel.solver.search.AbstractSearchLoop
searchStrategy, stop
 
Fields inherited from interface choco.kernel.solver.search.ISearchLoop
LOGGER
 
Constructor Summary
ObservableStepSearchLoop(AbstractGlobalSearchStrategy searchStrategy)
           
 
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 downBranch()
           
 Boolean endLoop()
           
 AbstractSearchLoop getInternalSearchLoop()
           
 void initialize()
           
 void initLoop()
           
 void initSearch()
           
 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.
 void openNode()
           
 void pause()
          Pause the normal run loop
 void restart()
           
 void runForAWhile()
          Action to do in a normal run loop
 void runStepByStep()
          Action to do in a step-by-step run loop
 void setAction(IObservableStepSearchLoop.Step action)
           
 void test()
           
 void upBranch()
           
 
Methods inherited from class choco.kernel.solver.search.AbstractSearchLoop
getBacktrackCount, getDepthCount, getNodeCount, getRestartCount, getSearchStrategy, isStopped, run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface choco.kernel.solver.search.ISearchLoop
getSearchStrategy, run
 

Field Detail

state

public State state
Constructor Detail

ObservableStepSearchLoop

public ObservableStepSearchLoop(AbstractGlobalSearchStrategy searchStrategy)
Method Detail

getInternalSearchLoop

public AbstractSearchLoop getInternalSearchLoop()

test

public final void test()

initialize

public void initialize()
Specified by:
initialize in interface ISearchLoop
Overrides:
initialize in class AbstractSearchLoop

downBranch

public void downBranch()
Specified by:
downBranch in class AbstractSearchLoop

endLoop

public Boolean endLoop()
Specified by:
endLoop in class AbstractSearchLoop

initLoop

public void initLoop()
Specified by:
initLoop in class AbstractSearchLoop

initSearch

public void initSearch()
Specified by:
initSearch in class AbstractSearchLoop

openNode

public void openNode()
Specified by:
openNode in class AbstractSearchLoop

restart

public void restart()
Specified by:
restart in class AbstractSearchLoop

upBranch

public void upBranch()
Specified by:
upBranch in class AbstractSearchLoop

runStepByStep

public void runStepByStep()
Description copied from interface: IObservableStepSearchLoop
Action to do in a step-by-step run loop

Specified by:
runStepByStep in interface IObservableStepSearchLoop

runForAWhile

public void runForAWhile()
Description copied from interface: IObservableStepSearchLoop
Action to do in a normal run loop

Specified by:
runForAWhile in interface IObservableStepSearchLoop

pause

public void pause()
Description copied from interface: IObservableStepSearchLoop
Pause the normal run loop

Specified by:
pause in interface IObservableStepSearchLoop

setAction

public void setAction(IObservableStepSearchLoop.Step action)
Specified by:
setAction in interface IObservableStepSearchLoop

addObserver

public 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. The order in which notifications will be delivered to multiple observers is not specified. See the class comment.

Specified by:
addObserver in interface IObservable
Parameters:
o - an observer to be added.
Throws:
NullPointerException - if the parameter o is null.

notifyObservers

public 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.

Each observer has its update method called with two arguments: this observable object and the arg argument.

Specified by:
notifyObservers in interface IObservable
Parameters:
arg - any object.
See Also:
IObserver.update(choco.IObservable , Object)


Copyright © 2012. All Rights Reserved.