From 2e16367bcc9fada32065ada89855a54d59ef5065 Mon Sep 17 00:00:00 2001 From: Milan Lukic <2122158@stud.hs-mannheim.de> Date: Sat, 7 Jan 2023 19:12:48 +0100 Subject: [PATCH] minimale Anpassungen --- Roboterfabrik/src/Domäne/RobotFactory.java | 4 ++-- Roboterfabrik/src/facade/Factorysystem.java | 4 ++-- Roboterfabrik/src/ui/Factory.java | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) 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; }