org.eclipse.viatra.query.runtime.localsearch.operations.check

## Class CountCheck

- java.lang.Object
- - org.eclipse.viatra.query.runtime.localsearch.operations.check.CheckOperation
  - - org.eclipse.viatra.query.runtime.localsearch.operations.check.CountCheck

- All Implemented Interfaces:
    ISearchOperation

      public class CountCheck
      extends CheckOperation

  Calculates the count of matches for a called matcher

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CountCheck(MatcherReference calledQuery, java.util.Map<PParameter,java.lang.Integer> parameterMapping, int position)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected boolean` | `check(MatchingFrame frame)` Executes the checking operation
    `java.util.List<java.lang.Integer>` | `getVariablePositions()`
    `void` | `onInitialize(MatchingFrame frame, ISearchContext context)` During the execution of the corresponding plan, the onInitialize callback is evaluated before the execution of the operation may begin.
    `java.lang.String` | `toString()`

    - ### Methods inherited from class org.eclipse.viatra.query.runtime.localsearch.operations.check.CheckOperation

      `execute, onBacktrack`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### CountCheck

          public CountCheck(MatcherReference calledQuery,
                            java.util.Map<PParameter,java.lang.Integer> parameterMapping,
                            int position)

      Since:
        1.5

  - ### Method Detail

    - #### onInitialize

          public void onInitialize(MatchingFrame frame,
                                   ISearchContext context)
                            throws LocalSearchException

      Description copied from interface: `ISearchOperation`
      During 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:
        `onInitialize` in interface `ISearchOperation`
      Overrides:
        `onInitialize` in class `CheckOperation`
      Throws:
        `LocalSearchException`

    - #### check

          protected boolean check(MatchingFrame frame)
                           throws LocalSearchException

      Description copied from class: `CheckOperation`
      Executes the checking operation
      Specified by:
        `check` in class `CheckOperation`
      Returns:
      Throws:
        `LocalSearchException`

    - #### getVariablePositions

          public java.util.List<java.lang.Integer> getVariablePositions()

      Returns:
        the ordered list of the variable numbers that are affected by the search operation

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`