org.eclipse.viatra.addon.viewers.runtime.model

## Class ViewerDataFilter

- java.lang.Object
- - org.eclipse.viatra.addon.viewers.runtime.model.ViewerDataFilter

-     public class ViewerDataFilter
      extends java.lang.Object

  A wrapper class for filter definitions. It is used to create filtered observable Sets for patterns. A filter definition is considered unchangeable for the entire lifecycle of the ViewerFilter instance.

  Warning After using a filter to create a `ViewerDataFilter`, the updates of this filter will not be pushed to the Filter

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static ViewerDataFilter` | `UNFILTERED`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ViewerDataFilter()` Initializes an empty data filter.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addMultiFilter(IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>> pattern, java.util.Collection<IPatternMatch> matches, ViatraQueryFilterSemantics semantics)`
    `void` | `addSingleFilter(IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>> pattern, IPatternMatch match)` Adds a new filter to a viewer data filter.
    `static ViewerDataFilter` | `cloneFilter(ViewerDataFilter other)` Copies all filter rules from an existing `ViewerDataFilter` instance.
    `ViewerFilterDefinition` | `getFilter(IQuerySpecification<?> pattern)`
    `boolean` | `isFiltered(IQuerySpecification<?> pattern)`
    `void` | `removeFilter(IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>> pattern)` Removes a filter from the rules.

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

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

- - ### Field Detail

    - #### UNFILTERED

          public static final ViewerDataFilter UNFILTERED

  - ### Constructor Detail

    - #### ViewerDataFilter

          public ViewerDataFilter()

      Initializes an empty data filter.

  - ### Method Detail

    - #### cloneFilter

          public static ViewerDataFilter cloneFilter(ViewerDataFilter other)

      Copies all filter rules from an existing `ViewerDataFilter` instance.

    - #### addSingleFilter

          public void addSingleFilter(IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>> pattern,
                                      IPatternMatch match)

      Adds a new filter to a viewer data filter.
      Parameters:
        `pattern` -
        `match` -

    - #### addMultiFilter

          public void addMultiFilter(IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>> pattern,
                                     java.util.Collection<IPatternMatch> matches,
                                     ViatraQueryFilterSemantics semantics)

    - #### removeFilter

          public void removeFilter(IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>> pattern)

      Removes a filter from the rules.
      Parameters:
        `pattern` -

    - #### isFiltered

          public boolean isFiltered(IQuerySpecification<?> pattern)

    - #### getFilter

          public ViewerFilterDefinition getFilter(IQuerySpecification<?> pattern)