Package org.eclipse.viatra.query.runtime.localsearch.operations.extend

## Class SingleValueExtendOperationExecutor<T>

- java.lang.Object
- - org.eclipse.viatra.query.runtime.localsearch.operations.ExtendOperationExecutor<T>
  - - org.eclipse.viatra.query.runtime.localsearch.operations.extend.SingleValueExtendOperationExecutor<T>

- All Implemented Interfaces:
    `ISearchOperation.ISearchOperationExecutor`

      public abstract class SingleValueExtendOperationExecutor<T>
      extends ExtendOperationExecutor<T>

  Since:
    2.0
  No Extend:
    This class is not intended to be subclassed by clients.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected int` | `position` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `SingleValueExtendOperationExecutor​(int position)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected void` | `cleanup​(MatchingFrame frame, ISearchContext context)` | Restores the frame to the state before `ExtendOperationExecutor.fillInValue(Object, MatchingFrame, ISearchContext)`.
    `protected boolean` | `fillInValue​(T newValue, MatchingFrame frame, ISearchContext context)` | Updates the frame with the next element of the iterator.

    - ### Methods inherited from class org.eclipse.viatra.query.runtime.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 org.eclipse.viatra.query.runtime.localsearch.operations.ISearchOperation.ISearchOperationExecutor

      `getOperation`

- - ### Field Detail

    - #### position

          protected int position

  - ### Constructor Detail

    - #### SingleValueExtendOperationExecutor

          public SingleValueExtendOperationExecutor​(int position)

      Parameters:
        `position` - the frame position all values are to be added

  - ### Method Detail

    - #### fillInValue

          protected final boolean fillInValue​(T newValue,
                                              MatchingFrame frame,
                                              ISearchContext context)

      Description copied from class: `ExtendOperationExecutor`
      Updates the frame with the next element of the iterator. Called during `ExtendOperationExecutor.execute(MatchingFrame, ISearchContext)`.
      Specified by:
        `fillInValue` in class `ExtendOperationExecutor<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

          protected final void cleanup​(MatchingFrame frame,
                                       ISearchContext context)

      Description copied from class: `ExtendOperationExecutor`
      Restores the frame to the state before `ExtendOperationExecutor.fillInValue(Object, MatchingFrame, ISearchContext)`. Called during `ExtendOperationExecutor.onBacktrack(MatchingFrame, ISearchContext)`.
      Specified by:
        `cleanup` in class `ExtendOperationExecutor<T>`