Package org.jacop.search
Class SimpleTimeOut
- java.lang.Object
-
- org.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:
- 4.8
-
-
Field Summary
Fields Modifier and Type Field Description intsolutionsNoIt records number of found solutions.TimeOutListener[]timeOutListenersIt contains child(ren) of this timeout listener.booleantimeOutOccurredIt specifies if the timeout has already occurred.
-
Constructor Summary
Constructors Constructor Description SimpleTimeOut()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecutedAtTimeOut(int solutionsNo)It is executed right after time out is determined.voidsetChildrenListeners(TimeOutListener child)It sets child listener for this timeout listener.voidsetChildrenListeners(TimeOutListener[] children)It sets children listeners for this timeout listener.
-
-
-
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.
-
-
Method Detail
-
executedAtTimeOut
public void executedAtTimeOut(int solutionsNo)
Description copied from interface:TimeOutListenerIt is executed right after time out is determined.- Specified by:
executedAtTimeOutin interfaceTimeOutListener- Parameters:
solutionsNo- number of solutions found before the timeout occurred.
-
setChildrenListeners
public void setChildrenListeners(TimeOutListener[] children)
Description copied from interface:TimeOutListenerIt sets children listeners for this timeout listener.- Specified by:
setChildrenListenersin interfaceTimeOutListener- Parameters:
children- list of children listeners.
-
setChildrenListeners
public void setChildrenListeners(TimeOutListener child)
Description copied from interface:TimeOutListenerIt sets child listener for this timeout listener.- Specified by:
setChildrenListenersin interfaceTimeOutListener- Parameters:
child- child listener for this timeout listener.
-
-