minimale Anpassungen
parent
b8de76edc5
commit
2e16367bcc
|
@ -7,7 +7,7 @@ import tpe.exceptions.roboter.exceptions.RobotException;
|
||||||
public class RobotFactory {
|
public class RobotFactory {
|
||||||
private String name;
|
private String name;
|
||||||
private Roboter pris = Nexus6.getInstance();
|
private Roboter pris = Nexus6.getInstance();
|
||||||
private static HashMap <Integer, Roboter> roboterLager = new HashMap<>();
|
private HashMap <Integer, Roboter> roboterLager = new HashMap<>();
|
||||||
|
|
||||||
public RobotFactory (String name) {
|
public RobotFactory (String name) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
|
@ -87,7 +87,7 @@ public RobotFactory (String name) {
|
||||||
return roboterLager.size();
|
return roboterLager.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean istDieserRoboterDa(int id) {
|
public boolean istDieserRoboterDa(int id) {
|
||||||
return roboterLager.containsKey(id);
|
return roboterLager.containsKey(id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,8 +54,8 @@ public class Factorysystem {
|
||||||
return robotFactory.datenDesRoboters(id);
|
return robotFactory.datenDesRoboters(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean istDieserRoboterDa(int id) {
|
public boolean istDieserRoboterDa(int id) {
|
||||||
boolean istDa = RobotFactory.istDieserRoboterDa(id);
|
boolean istDa = robotFactory.istDieserRoboterDa(id);
|
||||||
return istDa;
|
return istDa;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -137,7 +137,7 @@ public class Factory {
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean istDieserRoboterDa(int id) {
|
private boolean istDieserRoboterDa(int id) {
|
||||||
boolean istDa = Factorysystem.istDieserRoboterDa(id);
|
boolean istDa = factorysystem.istDieserRoboterDa(id);
|
||||||
return istDa;
|
return istDa;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue