public class ActivationCodesConflictSet extends java.lang.Object implements ChangeableConflictSet
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 and Description |
---|
ActivationCodesConflictSet(ConflictSet nextActivationsConflictSet,
IStateCoder stateCoder) |
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() |
protected org.eclipse.viatra.dse.base.ActivationCodesConflictSet.ActivationCodesMultiBiMap activationCodes
protected IStateCoder stateCoder
protected java.util.Set<Activation<?>> newActivations
protected java.util.Set<Activation<?>> removedActivations
public ActivationCodesConflictSet(ConflictSet nextActivationsConflictSet, IStateCoder stateCoder)
public void setIncremental(boolean isIncremental)
public boolean removeActivation(Activation<?> activation)
ChangeableConflictSet
remove
may be called
on Activations that are not in the conflict set!removeActivation
in interface ChangeableConflictSet
activation
- the activation that should be removed from the conflict setpublic boolean addActivation(Activation<?> activation)
ChangeableConflictSet
add
may be called
multiple times on an Activation already in the conflict set!addActivation
in interface ChangeableConflictSet
activation
- the activation that should be added to the conflict setpublic java.lang.Object getActivationId(Activation<?> activation)
public Activation<?> getActivation(java.lang.Object activationId)
public void updateActivationCodes()
protected void reinitWithActivations(ConflictSet nextActivationsConflictSet)
public Activation<?> getNextActivation()
getNextActivation
in interface ConflictSet
public java.util.Set<Activation<?>> getNextActivations()
getNextActivations
in interface ConflictSet
public java.util.Set<Activation<?>> getConflictingActivations()
getConflictingActivations
in interface ConflictSet
public ConflictResolver getConflictResolver()
getConflictResolver
in interface ConflictSet
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.Collection<java.lang.Object> getCurrentActivationCodes()