ExamplesJaCoP
Class CrossWord.PrintListener

java.lang.Object
  extended by JaCoP.search.SimpleSolutionListener
      extended by ExamplesJaCoP.CrossWord.PrintListener
All Implemented Interfaces:
SolutionListener
Enclosing class:
CrossWord

public class CrossWord.PrintListener
extends SimpleSolutionListener

It is a simple print listener to print every tenth solution encountered.


Field Summary
 
Fields inherited from class JaCoP.search.SimpleSolutionListener
childrenSolutionListeners, parentSolutionListener, parentSolutionNo, solutionLimit
 
Constructor Summary
CrossWord.PrintListener()
           
 
Method Summary
 boolean executeAfterSolution(Search search, SelectChoicePoint select)
          It is executed by search after a solution is found.
 
Methods inherited from class JaCoP.search.SimpleSolutionListener
assignSolution, assignSolution, findSolutionMatchingParent, getParentSolution, getSolution, getSolutions, getVariables, isRecordingSolutions, printAllSolutions, recordSolution, recordSolutions, returnSolution, returnSolution, searchAll, setChildrenListeners, setChildrenListeners, setParentSolutionListener, setSolutionLimit, solutionLimitReached, solutionsNo, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CrossWord.PrintListener

public CrossWord.PrintListener()
Method Detail

executeAfterSolution

public boolean executeAfterSolution(Search search,
                                    SelectChoicePoint select)
Description copied from interface: SolutionListener
It is executed by search after a solution is found.

Specified by:
executeAfterSolution in interface SolutionListener
Overrides:
executeAfterSolution in class SimpleSolutionListener
Parameters:
search - the search which have found a solution.
select - the select choice point heuristic
Returns:
false forces the search to keep looking for a solution, true then the search will accept a solution.