Class CheckOperationExecutor
java.lang.Object
tools.refinery.interpreter.localsearch.operations.CheckOperationExecutor
- All Implemented Interfaces:
ISearchOperation.ISearchOperationExecutor
public abstract class CheckOperationExecutor
extends Object
implements ISearchOperation.ISearchOperationExecutor
Abstract base class for search operations that check only the already set variables.
- Since:
- 2.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract booleancheck(MatchingFrame frame, ISearchContext context) Executes the checking operationbooleanexecute(MatchingFrame frame, ISearchContext context) voidonBacktrack(MatchingFrame frame, ISearchContext context) After the execution of the operation failed andISearchOperation.ISearchOperationExecutor.execute(MatchingFrame, ISearchContext)returns false, the onBacktrack callback is evaluated.voidonInitialize(MatchingFrame frame, ISearchContext context) During the execution of the corresponding plan, the onInitialize callback is evaluated before the execution of the operation may begin.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface tools.refinery.interpreter.localsearch.operations.ISearchOperation.ISearchOperationExecutor
getOperation
-
Constructor Details
-
CheckOperationExecutor
public CheckOperationExecutor()
-
-
Method Details
-
onInitialize
Description copied from interface:ISearchOperation.ISearchOperationExecutorDuring the execution of the corresponding plan, the onInitialize callback is evaluated before the execution of the operation may begin. Operations may use this method to initialize its internal data structures.- Specified by:
onInitializein interfaceISearchOperation.ISearchOperationExecutor
-
onBacktrack
Description copied from interface:ISearchOperation.ISearchOperationExecutorAfter the execution of the operation failed andISearchOperation.ISearchOperationExecutor.execute(MatchingFrame, ISearchContext)returns false, the onBacktrack callback is evaluated. Operations may use this method to clean up any temporary structures, and make the operation ready for a new execution.- Specified by:
onBacktrackin interfaceISearchOperation.ISearchOperationExecutor
-
execute
- Specified by:
executein interfaceISearchOperation.ISearchOperationExecutor- Parameters:
frame-context-- Returns:
- true if successful, or false if backtracking needed
-
check
Executes the checking operation- Since:
- 1.7
-