From 22f136449f0d007c8c58d8a8ceb5c6d1dd5fd5d1 Mon Sep 17 00:00:00 2001 From: Maxim Volkov Date: Thu, 17 Feb 2022 22:17:56 +0100 Subject: [PATCH] Added: Javadoc for Warehouse --- .../main/java/de/hs_fulda/ciip/projjpn/Warehouse.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Warehouse.java b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Warehouse.java index 6b6a867..c0fd4fa 100644 --- a/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Warehouse.java +++ b/projjpn/src/main/java/de/hs_fulda/ciip/projjpn/Warehouse.java @@ -5,10 +5,19 @@ import java.util.HashMap; public class Warehouse { protected HashMap pool = new HashMap(); + /** + * + * @param item Item to insert. + * @return the inserted Item or null. + */ public Item insertItem(Item item) { return pool.putIfAbsent(item.getTitel(), item); } + /** + * + * @return The total amount of all Items. + */ public int getCountOfStock() { int sumItems = 0; for (HashMap.Entry set : pool.entrySet()) {