Package: ErstelleMaschineKommandoMitResultat
ErstelleMaschineKommandoMitResultat
name | instruction | branch | complexity | line | method | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ErstelleMaschineKommandoMitResultat(int, MaschinenTyp) |
|
|
|
|
|
||||||||||||||||||||
accept(KommandoVisitor) |
|
|
|
|
|
||||||||||||||||||||
doIt() |
|
|
|
|
|
Coverage
1: package schnittstelle.maschinenKommandos;
2:
3: import maschine.Maschine;
4: import maschine.MaschinenTyp;
5: import schnittstelle.kommandoArchitektur.KommandoOhneExceptionMitResultat;
6: import schnittstelle.kommandoArchitektur.KommandoVisitor;
7:
8: /**
9: * Kommando zum Erstellen von Maschinen.
10: */
11: public class ErstelleMaschineKommandoMitResultat extends KommandoOhneExceptionMitResultat<Maschine> {
12:         
13:         private final int nummerIntern;
14:         private final MaschinenTyp maschinentyp;
15:         
16:         /**
17:          * @param nummerIntern
18:          * nummer
19:          * @param maschinentyp
20:          * maschinenTzp
21:          */
22:         public ErstelleMaschineKommandoMitResultat(final int nummerIntern, final MaschinenTyp maschinentyp) {
23:                 this.nummerIntern = nummerIntern;
24:                 this.maschinentyp = maschinentyp;
25:         }
26:         
27:         @Override
28:         protected Maschine doIt() {
29:                 return new Maschine(this.nummerIntern, this.maschinentyp);
30:                 
31:         }
32:         
33:         @Override
34:         public void accept(final KommandoVisitor v) {
35:                 v.handle(this);
36:         }
37:         
38: }