Skip to content

Package: Zusammenfuehrungstyp

Zusammenfuehrungstyp

nameinstructionbranchcomplexitylinemethod
Zusammenfuehrungstyp()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
getOutport()
M: 5 C: 15
75%
M: 2 C: 2
50%
M: 2 C: 1
33%
M: 1 C: 2
67%
M: 0 C: 1
100%
setOrAddInporttyp(Porttyp)
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
setOrAddOutporttyp(Porttyp)
M: 0 C: 6
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%

Coverage

1: package ablaeufe.meta.konnektortypen;
2:
3: import ablaeufe.meta.Porttyp;
4: import ablaeufe.meta.visitor.ZusammenFuehrungsTypVisitor;
5:
6: /**
7: * Ein Zusammenführungstyp ist dafür da um mehrere atomare Prozesstypen zusammenzuführen.
8: * Er hat immer genau einen Outporttypen aber beliebig viele Inporttypen.
9: */
10: public abstract class Zusammenfuehrungstyp extends Konnektortyp {
11:
12: /**
13: * Erstellt einen Zusammenführungstyp ohne initiale Inporttypen und Outporttypen.
14: */
15: Zusammenfuehrungstyp() {
16: }
17:
18: @Override
19: public void setOrAddOutporttyp(final Porttyp porttyp) {
20: this.clearOutporttypen();
21: this.addOutporttyp(porttyp);
22: }
23:
24: @Override
25: public void setOrAddInporttyp(final Porttyp porttyp) {
26: this.addInporttyp(porttyp);
27: }
28:
29: /**
30: * Accept Operation für das Visitor Pattern.
31: *
32: * @param visitor der Visitor
33: */
34: public abstract void accept(ZusammenFuehrungsTypVisitor visitor);
35:
36: /**
37: * Gibt den Outport einer Zusammenführung zurück.
38: *
39: * @return den Outport einer Zusammenführung.
40: */
41: public Porttyp getOutport() {
42:• if (this.getOutporttypen().isEmpty() || this.getOutporttypen().size() > 1) {
43: throw new RuntimeException("Outports leer oder es gibt mehr als Einen!");
44: }
45: return this.getOutporttypen().get(0);
46: }
47: }