JaCoP.search
Class SimpleTimeOut

java.lang.Object
  extended by JaCoP.search.SimpleTimeOut
All Implemented Interfaces:
TimeOutListener

public class SimpleTimeOut
extends java.lang.Object
implements TimeOutListener

It defines a simple time out listener. It only records the fact that timeout listener occurred as well as number of solutions found before the timeout.

Version:
3.1
Author:
Radoslaw Szymanek and Krzysztof Kuchcinski

Field Summary
 int solutionsNo
          It records number of found solutions.
 TimeOutListener[] timeOutListeners
          It contains child(ren) of this timeout listener.
 boolean timeOutOccurred
          It specifies if the timeout has already occurred.
 
Constructor Summary
SimpleTimeOut()
           
 
Method Summary
 void executedAtTimeOut(int solutionsNo)
          It is executed right after time out is determined.
 void setChildrenListeners(TimeOutListener child)
          It sets child listener for this timeout listener.
 void setChildrenListeners(TimeOutListener[] children)
          It sets children listeners for this timeout listener.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

timeOutOccurred

public boolean timeOutOccurred
It specifies if the timeout has already occurred.


solutionsNo

public int solutionsNo
It records number of found solutions.


timeOutListeners

public TimeOutListener[] timeOutListeners
It contains child(ren) of this timeout listener.

Constructor Detail

SimpleTimeOut

public SimpleTimeOut()
Method Detail

executedAtTimeOut

public void executedAtTimeOut(int solutionsNo)
Description copied from interface: TimeOutListener
It is executed right after time out is determined.

Specified by:
executedAtTimeOut in interface TimeOutListener
Parameters:
solutionsNo - number of solutions found before the timeout occurred.

setChildrenListeners

public void setChildrenListeners(TimeOutListener[] children)
Description copied from interface: TimeOutListener
It sets children listeners for this timeout listener.

Specified by:
setChildrenListeners in interface TimeOutListener
Parameters:
children - list of children listeners.

setChildrenListeners

public void setChildrenListeners(TimeOutListener child)
Description copied from interface: TimeOutListener
It sets child listener for this timeout listener.

Specified by:
setChildrenListeners in interface TimeOutListener
Parameters:
child - child listener for this timeout listener.