org.eclipse.viatra.addon.databinding.runtime.collection

## Class ObservableCollectionHelper

- java.lang.Object
- - org.eclipse.viatra.addon.databinding.runtime.collection.ObservableCollectionHelper

-     public final class ObservableCollectionHelper
      extends java.lang.Object

  Utility class to prepare a rule in an agenda for an observable collection. For use cases, see `ObservablePatternMatchSet` and `ObservablePatternMatchList`.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected static <Match extends IPatternMatch,Matcher extends ViatraQueryMatcher<Match>> RuleSpecification<Match>` | `createRuleSpecification(IObservablePatternMatchCollectionUpdate<Match> observableCollectionUpdate, IQuerySpecification<Matcher> querySpecification)` Creates the rule used for updating the results.
    `protected static <Match extends IPatternMatch,Matcher extends ViatraQueryMatcher<Match>> RuleSpecification<Match>` | `createRuleSpecification(IObservablePatternMatchCollectionUpdate<Match> observableCollectionUpdate, Matcher matcher)` Creates the rule used for updating the results.
    `protected static <Match extends IPatternMatch,Matcher extends ViatraQueryMatcher<Match>> RuleSpecification<Match>` | `createUpdatingRuleSpecification(IObservablePatternMatchCollectionUpdate<Match> observableCollectionUpdate, IQuerySpecification<Matcher> querySpecification)` Creates the rule used for updating the results including changes in feature values.
    `protected static void` | `disposeRuleEngine(RuleEngine ruleEngine)`
    `protected static <Match extends IPatternMatch> RuleEngine` | `prepareRuleEngine(ViatraQueryEngine engine, RuleSpecification<Match> specification, EventFilter<Match> filter)`

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

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

- - ### Method Detail

    - #### createRuleSpecification

          protected static <Match extends IPatternMatch,Matcher extends ViatraQueryMatcher<Match>> RuleSpecification<Match> createRuleSpecification(IObservablePatternMatchCollectionUpdate<Match> observableCollectionUpdate,
                                                                                                                                                    IQuerySpecification<Matcher> querySpecification)

      Creates the rule used for updating the results.
      Parameters:
        `observableCollectionUpdate` - the observable collection to handle
        `querySpecification` - the `IQuerySpecification` used to create the rule

    - #### createUpdatingRuleSpecification

          protected static <Match extends IPatternMatch,Matcher extends ViatraQueryMatcher<Match>> RuleSpecification<Match> createUpdatingRuleSpecification(IObservablePatternMatchCollectionUpdate<Match> observableCollectionUpdate,
                                                                                                                                                            IQuerySpecification<Matcher> querySpecification)

      Creates the rule used for updating the results including changes in feature values.
      Parameters:
        `observableCollectionUpdate` - the observable collection to handle
        `querySpecification` - the `IQuerySpecification` used to create the rule

    - #### createRuleSpecification

          protected static <Match extends IPatternMatch,Matcher extends ViatraQueryMatcher<Match>> RuleSpecification<Match> createRuleSpecification(IObservablePatternMatchCollectionUpdate<Match> observableCollectionUpdate,
                                                                                                                                                    Matcher matcher)

      Creates the rule used for updating the results.
      Parameters:
        `observableCollectionUpdate` - the observable collection to handle
        `matcher` - the `ViatraQueryMatcher` used to create the rule

    - #### prepareRuleEngine

          protected static <Match extends IPatternMatch> RuleEngine prepareRuleEngine(ViatraQueryEngine engine,
                                                                                      RuleSpecification<Match> specification,
                                                                                      EventFilter<Match> filter)

    - #### disposeRuleEngine

          protected static void disposeRuleEngine(RuleEngine ruleEngine)