public class InvertedDisappearancePriorityConflictResolver extends FixedPriorityConflictResolver
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.
Modifier and Type | Class and Description |
---|---|
static class |
InvertedDisappearancePriorityConflictResolver.InvertedDisappearancePriorityConflictSet |
defaultPriority, priorities
Constructor and 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.
|
Modifier and Type | Method and Description |
---|---|
protected FixedPriorityConflictSet |
createReconfigurableConflictSet() |
void |
setPriority(RuleSpecification<?> specification,
int priority)
Sets the priority for the given specification.
|
createConflictSet, getConflictSets
public InvertedDisappearancePriorityConflictResolver()
public InvertedDisappearancePriorityConflictResolver(int defaultPriority)
public void setPriority(RuleSpecification<?> specification, int priority)
FixedPriorityConflictResolver
setPriority
in class FixedPriorityConflictResolver
protected FixedPriorityConflictSet createReconfigurableConflictSet()
createReconfigurableConflictSet
in class FixedPriorityConflictResolver