org.eclipse.viatra.query.runtime.localsearch.matcher

## Class LocalSearchMatcher

- java.lang.Object
- - org.eclipse.viatra.query.runtime.localsearch.matcher.LocalSearchMatcher

- All Implemented Interfaces:
    ILocalSearchAdaptable

      public class LocalSearchMatcher
      extends java.lang.Object
      implements ILocalSearchAdaptable

  No Instantiate:
    This class is not intended to be instantiated by clients.

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `LocalSearchMatcher(IPlanDescriptor query)` If a descendant initializes a matcher using the default constructor, it is expected that it also calls the `setPlan(SearchPlanExecutor)` and `setFramesize(int)` methods manually.
    `` | `LocalSearchMatcher(IPlanDescriptor planDescriptor, java.util.Collection<SearchPlanExecutor> plan, int frameSize)`
    `protected` | `LocalSearchMatcher(IPlanDescriptor planDescriptor, com.google.common.collect.ImmutableList<SearchPlanExecutor> plan, int frameSize)`
    `` | `LocalSearchMatcher(IPlanDescriptor planDescriptor, SearchPlanExecutor[] plan, int frameSize)`
    `` | `LocalSearchMatcher(IPlanDescriptor planDescriptor, SearchPlanExecutor plan, int frameSize)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addAdapter(ILocalSearchAdapter adapter)`
    `void` | `addAdapters(java.util.List<ILocalSearchAdapter> adapters)`
    `int` | `countMatches()`
    `int` | `countMatches(MatchingFrame initialFrame)`
    `MatchingFrame` | `editableMatchingFrame()`
    `java.util.List<ILocalSearchAdapter>` | `getAdapters()`
    `java.util.Collection<Tuple>` | `getAllMatches()`
    `java.util.Collection<Tuple>` | `getAllMatches(MatchingFrame initialFrame)`
    `int` | `getFrameSize()`
    `MatchingFrame` | `getOneArbitraryMatch()`
    `MatchingFrame` | `getOneArbitraryMatch(MatchingFrame initialFrame)`
    `int` | `getParameterCount()`
    `com.google.common.collect.ImmutableList<SearchPlanExecutor>` | `getPlan()`
    `IPlanDescriptor` | `getPlanDescriptor()`
    `PQuery` | `getQuerySpecification()` Returns the query specification this matcher used as source for the implementation
    `boolean` | `hasMatch()`
    `boolean` | `hasMatch(MatchingFrame initialFrame)`
    `void` | `removeAdapter(ILocalSearchAdapter adapter)`
    `void` | `removeAdapters(java.util.List<ILocalSearchAdapter> adapters)`
    `protected void` | `setFramesize(int frameSize)`
    `protected void` | `setPlan(SearchPlanExecutor plan)`
    `protected void` | `setPlan(SearchPlanExecutor[] plan)`

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

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

- - ### Constructor Detail

    - #### LocalSearchMatcher

          protected LocalSearchMatcher(IPlanDescriptor query)

      If a descendant initializes a matcher using the default constructor, it is expected that it also calls the `setPlan(SearchPlanExecutor)` and `setFramesize(int)` methods manually.
      Since:
        1.5

    - #### LocalSearchMatcher

          public LocalSearchMatcher(IPlanDescriptor planDescriptor,
                                    SearchPlanExecutor plan,
                                    int frameSize)

      Since:
        1.5

    - #### LocalSearchMatcher

          public LocalSearchMatcher(IPlanDescriptor planDescriptor,
                                    SearchPlanExecutor[] plan,
                                    int frameSize)

      Since:
        1.5

    - #### LocalSearchMatcher

          public LocalSearchMatcher(IPlanDescriptor planDescriptor,
                                    java.util.Collection<SearchPlanExecutor> plan,
                                    int frameSize)

      Since:
        1.5

    - #### LocalSearchMatcher

          protected LocalSearchMatcher(IPlanDescriptor planDescriptor,
                                       com.google.common.collect.ImmutableList<SearchPlanExecutor> plan,
                                       int frameSize)

      Since:
        1.5

  - ### Method Detail

    - #### getPlan

          public com.google.common.collect.ImmutableList<SearchPlanExecutor> getPlan()

    - #### getFrameSize

          public int getFrameSize()

    - #### getAdapters

          public java.util.List<ILocalSearchAdapter> getAdapters()

      Specified by:
        `getAdapters` in interface `ILocalSearchAdaptable`

    - #### addAdapter

          public void addAdapter(ILocalSearchAdapter adapter)

      Specified by:
        `addAdapter` in interface `ILocalSearchAdaptable`

    - #### removeAdapter

          public void removeAdapter(ILocalSearchAdapter adapter)

      Specified by:
        `removeAdapter` in interface `ILocalSearchAdaptable`

    - #### addAdapters

          public void addAdapters(java.util.List<ILocalSearchAdapter> adapters)

      Specified by:
        `addAdapters` in interface `ILocalSearchAdaptable`

    - #### removeAdapters

          public void removeAdapters(java.util.List<ILocalSearchAdapter> adapters)

      Specified by:
        `removeAdapters` in interface `ILocalSearchAdaptable`

    - #### setPlan

          protected void setPlan(SearchPlanExecutor plan)

    - #### setPlan

          protected void setPlan(SearchPlanExecutor[] plan)

    - #### setFramesize

          protected void setFramesize(int frameSize)

    - #### editableMatchingFrame

          public MatchingFrame editableMatchingFrame()

    - #### hasMatch

          public boolean hasMatch()
                           throws LocalSearchException

      Throws:
        `LocalSearchException`

    - #### hasMatch

          public boolean hasMatch(MatchingFrame initialFrame)
                           throws LocalSearchException

      Throws:
        `LocalSearchException`

    - #### countMatches

          public int countMatches()
                           throws LocalSearchException

      Throws:
        `LocalSearchException`

    - #### countMatches

          public int countMatches(MatchingFrame initialFrame)
                           throws LocalSearchException

      Throws:
        `LocalSearchException`

    - #### getParameterCount

          public int getParameterCount()

    - #### getOneArbitraryMatch

          public MatchingFrame getOneArbitraryMatch()
                                             throws LocalSearchException

      Throws:
        `LocalSearchException`

    - #### getOneArbitraryMatch

          public MatchingFrame getOneArbitraryMatch(MatchingFrame initialFrame)
                                             throws LocalSearchException

      Throws:
        `LocalSearchException`

    - #### getAllMatches

          public java.util.Collection<Tuple> getAllMatches()
                                                    throws LocalSearchException

      Throws:
        `LocalSearchException`

    - #### getAllMatches

          public java.util.Collection<Tuple> getAllMatches(MatchingFrame initialFrame)
                                                    throws LocalSearchException

      Throws:
        `LocalSearchException`

    - #### getQuerySpecification

          public PQuery getQuerySpecification()

      Returns the query specification this matcher used as source for the implementation
      Returns:
        never null

    - #### getPlanDescriptor

          public IPlanDescriptor getPlanDescriptor()

      Since:
        1.5