Package org.eclipse.viatra.transformation.evm.specific.resolver

## Class InvertedDisappearancePriorityConflictResolver

- java.lang.Object
- - org.eclipse.viatra.transformation.evm.specific.resolver.ReconfigurableConflictResolver<FixedPriorityConflictSet>
  - - org.eclipse.viatra.transformation.evm.specific.resolver.FixedPriorityConflictResolver
    - - org.eclipse.viatra.transformation.evm.specific.resolver.InvertedDisappearancePriorityConflictResolver

- All Implemented Interfaces:
    `ConflictResolver`

      public class InvertedDisappearancePriorityConflictResolver
      extends FixedPriorityConflictResolver

  A conflict resolver implementation that assigns a fixed priority for each `RuleSpecification` it understands, and uses this priority for the appeared activations, while uses the inverse of this for the disappeared events.

  This conflict resolver is especially useful to make sure all deletions precede the creation of new model elements.

  NOTE: It is not recommended to use rules of zero priority with this conflict resolver, as in that case the order of additions and deletions is unspecified. For this reason, starting VIATRA version 2.1 a default priority of 1 is used instead.

  Since:
    1.0

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `InvertedDisappearancePriorityConflictResolver.InvertedDisappearancePriorityConflictSet` |

  - ### Field Summary

    - ### Fields inherited from class org.eclipse.viatra.transformation.evm.specific.resolver.FixedPriorityConflictResolver

      `defaultPriority, priorities`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `InvertedDisappearancePriorityConflictResolver()` | Initializes the conflict resolver with a default rule priority of 1.
    `InvertedDisappearancePriorityConflictResolver​(int defaultPriority)` | Initializes the conflict resolver with the specified default rule priority.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected FixedPriorityConflictSet` | `createReconfigurableConflictSet()` |
    `void` | `setPriority​(RuleSpecification<?> specification, int priority)` | Sets the priority for the given specification.

    - ### Methods inherited from class org.eclipse.viatra.transformation.evm.specific.resolver.ReconfigurableConflictResolver

      `createConflictSet, getConflictSets`

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

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

- - ### Constructor Detail

    - #### InvertedDisappearancePriorityConflictResolver

          public InvertedDisappearancePriorityConflictResolver()

      Initializes the conflict resolver with a default rule priority of 1.

    - #### InvertedDisappearancePriorityConflictResolver

          public InvertedDisappearancePriorityConflictResolver​(int defaultPriority)

      Initializes the conflict resolver with the specified default rule priority.
      Since:
        2.1

  - ### Method Detail

    - #### setPriority

          public void setPriority​(RuleSpecification<?> specification,
                                  int priority)

      Description copied from class: `FixedPriorityConflictResolver`
      Sets the priority for the given specification. The activations of rules with the lowest priority value will be the next activations while rules with higher priority values will only be included in the conflicting activations set. The default priority is set when the resolver is created; if unspecified, it is 0.
      Overrides:
        `setPriority` in class `FixedPriorityConflictResolver`

    - #### createReconfigurableConflictSet

          protected FixedPriorityConflictSet createReconfigurableConflictSet()

      Overrides:
        `createReconfigurableConflictSet` in class `FixedPriorityConflictResolver`