public class Scenario extends Event
Constructor and Description |
---|
Scenario()
Creates a default Scenario.
|
Scenario(java.lang.String name)
Creates a named Scenario.
|
Modifier and Type | Method and Description |
---|---|
Scenario |
addBinding(Binding binding)
Adds a Binding of initial Expressions to Variables to this Scenario.
|
Scenario |
addCondition(Condition condition)
Adds the guard Condition for this Scenario.
|
Scenario |
addEffect(Effect effect)
Adds the Effect,the updated binding of Expressions to Parameters.
|
boolean |
execute()
Conditionally executes this Scenario.
|
Binding |
getBinding()
Returns the Binding of Expressions to Variables in this Scenario.
|
Condition |
getCondition()
Returns the guard Condition for this Scenario.
|
Binding |
getEffect()
Returns the Effect, the updated binding of Expressions to Parameters.
|
java.util.Set<Predicate> |
getPartitions()
Returns the set of all possible atomic predicates and their negations
that can be derived from this Scenario's Condition.
|
boolean |
isEnabled()
Reports whether this Scenario is enabled in the current Memory state.
|
Scenario |
resolve(Scope scope)
Causes this Scenario to resolve its global/local Parameter references.
|
requestName, responseName, validate
equals, getName, hashCode, setName, setName, toString
safeEquals, safeHashCode, semanticError
public Scenario()
public Scenario(java.lang.String name)
name
- the name of this Scenario.public Scenario addBinding(Binding binding)
binding
- the Binding to add.public Binding getBinding()
public Scenario addCondition(Condition condition)
condition
- the condition to add.public Condition getCondition()
public java.util.Set<Predicate> getPartitions()
public Scenario addEffect(Effect effect)
effect
- the side-effect.public Binding getEffect()
public Scenario resolve(Scope scope)
scope
- a Scope containing global and local Parameters.public boolean isEnabled()
public boolean execute()