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 void
cleanup
(MatchingFrame frame, ISearchContext context) Restores the frame to the state beforeExtendOperationExecutor.fillInValue(Object, MatchingFrame, ISearchContext)
.protected final boolean
fillInValue
(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, onInitialize
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:ExtendOperationExecutor
Updates the frame with the next element of the iterator. Called duringExtendOperationExecutor.execute(MatchingFrame, ISearchContext)
.- Specified by:
fillInValue
in 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:ExtendOperationExecutor
Restores the frame to the state beforeExtendOperationExecutor.fillInValue(Object, MatchingFrame, ISearchContext)
. Called duringExtendOperationExecutor.onBacktrack(MatchingFrame, ISearchContext)
.- Specified by:
cleanup
in classExtendOperationExecutor<T>
-