Class PrintOutListener<T extends Var>

java.lang.Object
org.jacop.search.SimpleSolutionListener<T>
org.jacop.search.PrintOutListener<T>
All Implemented Interfaces:
SolutionListener<T>

public class PrintOutListener<T extends Var> extends SimpleSolutionListener<T> implements SolutionListener<T>
It is a simple example how it is possible to extend existing listeners to add your own functionality.
Version:
4.8
  • Constructor Details

    • PrintOutListener

      public PrintOutListener()
  • Method Details

    • executeAfterSolution

      public boolean executeAfterSolution(Search<T> search, SelectChoicePoint<T> select)
      It is executed right after consistency of the current search node. The return code specifies if the search should continue or exit.
      Specified by:
      executeAfterSolution in interface SolutionListener<T extends Var>
      Overrides:
      executeAfterSolution in class SimpleSolutionListener<T extends Var>
      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.