Class SingleValueExtendOperationExecutor<T>
java.lang.Object
tools.refinery.interpreter.localsearch.operations.ExtendOperationExecutor<T>
tools.refinery.interpreter.localsearch.operations.extend.SingleValueExtendOperationExecutor<T>
- All Implemented Interfaces:
ISearchOperation.ISearchOperationExecutor
- Since:
- 2.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidcleanup(MatchingFrame frame, ISearchContext context) Restores the frame to the state beforeExtendOperationExecutor.fillInValue(Object, MatchingFrame, ISearchContext).protected final booleanfillInValue(T newValue, MatchingFrame frame, ISearchContext context) Updates the frame with the next element of the iterator.Methods inherited from class tools.refinery.interpreter.localsearch.operations.ExtendOperationExecutor
execute, getIterator, onBacktrack, onInitializeMethods 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
-
Field Details
-
position
protected int position
-
-
Constructor Details
-
SingleValueExtendOperationExecutor
public SingleValueExtendOperationExecutor(int position) - Parameters:
position- the frame position all values are to be added
-
-
Method Details
-
fillInValue
Description copied from class:ExtendOperationExecutorUpdates the frame with the next element of the iterator. Called duringExtendOperationExecutor.execute(MatchingFrame, ISearchContext).- Specified by:
fillInValuein classExtendOperationExecutor<T>- Returns:
- true if the update is successful or false otherwise; in case of false is returned, the next element should be taken from the iterator.
-
cleanup
Description copied from class:ExtendOperationExecutorRestores the frame to the state beforeExtendOperationExecutor.fillInValue(Object, MatchingFrame, ISearchContext). Called duringExtendOperationExecutor.onBacktrack(MatchingFrame, ISearchContext).- Specified by:
cleanupin classExtendOperationExecutor<T>
-