org.eclipse.viatra.dse.base

## Class ActivationCodesConflictSet

- java.lang.Object
- - org.eclipse.viatra.dse.base.ActivationCodesConflictSet

- All Implemented Interfaces:
    ChangeableConflictSet, ConflictSet

      public class ActivationCodesConflictSet
      extends java.lang.Object
      implements ChangeableConflictSet

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected org.eclipse.viatra.dse.base.ActivationCodesConflictSet.ActivationCodesMultiBiMap` | `activationCodes`
    `protected java.util.Set<Activation<?>>` | `newActivations`
    `protected java.util.Set<Activation<?>>` | `removedActivations`
    `protected IStateCoder` | `stateCoder`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ActivationCodesConflictSet(ConflictSet nextActivationsConflictSet, IStateCoder stateCoder)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `addActivation(Activation<?> activation)` This method is called by the Agenda when an activation changes state and becomes or is still enabled.
    `Activation<?>` | `getActivation(java.lang.Object activationId)`
    `java.lang.Object` | `getActivationId(Activation<?> activation)`
    `java.util.Set<Activation<?>>` | `getConflictingActivations()`
    `ConflictResolver` | `getConflictResolver()`
    `java.util.Collection<java.lang.Object>` | `getCurrentActivationCodes()`
    `Activation<?>` | `getNextActivation()`
    `java.util.Set<Activation<?>>` | `getNextActivations()`
    `protected void` | `reinitWithActivations(ConflictSet nextActivationsConflictSet)`
    `boolean` | `removeActivation(Activation<?> activation)` This method is called by the Agenda when an activation changes state and becomes or is still disabled.
    `void` | `setIncremental(boolean isIncremental)`
    `java.lang.String` | `toString()`
    `void` | `updateActivationCodes()`

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

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

- - ### Field Detail

    - #### activationCodes

          protected org.eclipse.viatra.dse.base.ActivationCodesConflictSet.ActivationCodesMultiBiMap activationCodes

    - #### stateCoder

          protected IStateCoder stateCoder

    - #### newActivations

          protected java.util.Set<Activation<?>> newActivations

    - #### removedActivations

          protected java.util.Set<Activation<?>> removedActivations

  - ### Constructor Detail

    - #### ActivationCodesConflictSet

          public ActivationCodesConflictSet(ConflictSet nextActivationsConflictSet,
                                            IStateCoder stateCoder)

  - ### Method Detail

    - #### setIncremental

          public void setIncremental(boolean isIncremental)

    - #### removeActivation

          public boolean removeActivation(Activation<?> activation)

      Description copied from interface: `ChangeableConflictSet`
      This method is called by the Agenda when an activation changes state and becomes or is still disabled.

      NOTE: The ChangeableConflictSet is responsible for handling that `remove` may be called on Activations that are not in the conflict set!
      Specified by:
        `removeActivation` in interface `ChangeableConflictSet`
      Parameters:
        `activation` - the activation that should be removed from the conflict set
      Returns:
        true, if the conflict set changed

    - #### addActivation

          public boolean addActivation(Activation<?> activation)

      Description copied from interface: `ChangeableConflictSet`
      This method is called by the Agenda when an activation changes state and becomes or is still enabled.

      NOTE: The ChangeableConflictSet is responsible for handling that `add` may be called multiple times on an Activation already in the conflict set!
      Specified by:
        `addActivation` in interface `ChangeableConflictSet`
      Parameters:
        `activation` - the activation that should be added to the conflict set
      Returns:
        true, if the conflict set changed

    - #### getActivationId

          public java.lang.Object getActivationId(Activation<?> activation)

    - #### getActivation

          public Activation<?> getActivation(java.lang.Object activationId)

    - #### updateActivationCodes

          public void updateActivationCodes()

    - #### reinitWithActivations

          protected void reinitWithActivations(ConflictSet nextActivationsConflictSet)

    - #### getNextActivation

          public Activation<?> getNextActivation()

      Specified by:
        `getNextActivation` in interface `ConflictSet`
      Returns:
        the next activation chosen by the resolver

    - #### getNextActivations

          public java.util.Set<Activation<?>> getNextActivations()

      Specified by:
        `getNextActivations` in interface `ConflictSet`
      Returns:
        the set of activations that are considered as equal by the resolver

    - #### getConflictingActivations

          public java.util.Set<Activation<?>> getConflictingActivations()

      Specified by:
        `getConflictingActivations` in interface `ConflictSet`
      Returns:
        the set of all activations that are in conflict (all enabled activations)

    - #### getConflictResolver

          public ConflictResolver getConflictResolver()

      Specified by:
        `getConflictResolver` in interface `ConflictSet`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### getCurrentActivationCodes

          public java.util.Collection<java.lang.Object> getCurrentActivationCodes()