public class SeffBranch extends Object implements MeasurableSeffElement
SEFF conditions are conditions (like Java’s if , if - else and switch - case statements) which affect the calls a component makes to other components. Such conditions are—contrary to conditions that stay within an internal action—modelled in a component’s SEFF.
Constructor and Description |
---|
SeffBranch(Set<CodeSection> branches)
Creates a SeffBranch using a given code section.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object object) |
List<CodeSection> |
getBranches()
Gives a set of valid code sections representing a branch of this SeffBranch.
|
int |
hashCode() |
String |
toString() |
public SeffBranch(Set<CodeSection> branches)
branches
- A set of valid code sections. Each code sections represents a
branch of this SeffBranch. It must be sure, that two points of execution
exists, the so called beginning and ending of this branch, with the
following properties: When you would insert an empty code line at the
beginning and an empty code line at the ending, those would form a valid
code section with the beginning line as first line and the line at the
ending as last line. And each time the beginning point was reached,
exactly one code section of this branch gets executed immediately after
that. This is not checked during runtime, because it would solve the
halting problem. Immediately after that, the ending point is reached.
The set must contain at least 2
code sections. Must not be
null
. May not contain null
entries.IllegalArgumentException
- If branches
has less than 2
branches.public List<CodeSection> getBranches()
2
code sections.
The list is never null
. This list never contains null
entries. Changes to the list are not reflected in the SeffBranch.