Package Singletons
Class InventoryManager
java.lang.Object
Singletons.InventoryManager
Singleton class to manage the inventory and replenishment requests
-
Method Summary
Modifier and TypeMethodDescriptionvoid
createReplenishmentRequest
(String medicine, int quantity) Create a new replenishment requeststatic InventoryManager
Get the inventoryGet all replenishment requestsgetRequestsByStatus
(boolean fulfilled) Get all replenishment requests by statusvoid
setInventory
(Inventory inventory) Set the entire inventory Only meant for loading data from filevoid
setRequests
(List<ReplenishmentRequest> requests) Set the entire list of replenishment requests Only meant for loading data from file
-
Method Details
-
getInstance
-
createReplenishmentRequest
Create a new replenishment request- Parameters:
medicine
- name of the medicinequantity
- quantity of the medicine
-
getRequests
Get all replenishment requests -
getRequestsByStatus
Get all replenishment requests by status- Parameters:
fulfilled
- status of the request
-
getInventory
-
setInventory
Set the entire inventory Only meant for loading data from file- Parameters:
inventory
- inventory
-
setRequests
Set the entire list of replenishment requests Only meant for loading data from file- Parameters:
requests
- list of replenishment requests
-