diff --git a/Roboterfabrik/src/Domäne/RobotFactory.java b/Roboterfabrik/src/Domäne/RobotFactory.java index e35f2be..cb7ce8f 100644 --- a/Roboterfabrik/src/Domäne/RobotFactory.java +++ b/Roboterfabrik/src/Domäne/RobotFactory.java @@ -7,7 +7,7 @@ import tpe.exceptions.roboter.exceptions.RobotException; public class RobotFactory { private String name; private Roboter pris = Nexus6.getInstance(); -private static HashMap roboterLager = new HashMap<>(); +private HashMap roboterLager = new HashMap<>(); public RobotFactory (String name) { this.name = name; @@ -87,7 +87,7 @@ public RobotFactory (String name) { return roboterLager.size(); } - public static boolean istDieserRoboterDa(int id) { + public boolean istDieserRoboterDa(int id) { return roboterLager.containsKey(id); } } diff --git a/Roboterfabrik/src/facade/Factorysystem.java b/Roboterfabrik/src/facade/Factorysystem.java index 2dafbac..266a01c 100644 --- a/Roboterfabrik/src/facade/Factorysystem.java +++ b/Roboterfabrik/src/facade/Factorysystem.java @@ -54,8 +54,8 @@ public class Factorysystem { return robotFactory.datenDesRoboters(id); } - public static boolean istDieserRoboterDa(int id) { - boolean istDa = RobotFactory.istDieserRoboterDa(id); + public boolean istDieserRoboterDa(int id) { + boolean istDa = robotFactory.istDieserRoboterDa(id); return istDa; } } diff --git a/Roboterfabrik/src/ui/Factory.java b/Roboterfabrik/src/ui/Factory.java index 275bc32..ba11e68 100644 --- a/Roboterfabrik/src/ui/Factory.java +++ b/Roboterfabrik/src/ui/Factory.java @@ -137,7 +137,7 @@ public class Factory { } private boolean istDieserRoboterDa(int id) { - boolean istDa = Factorysystem.istDieserRoboterDa(id); + boolean istDa = factorysystem.istDieserRoboterDa(id); return istDa; }