Package com.mg105.use_cases.inventory
Interface InventoryPresenterInterface
- All Known Implementing Classes:
InventoryPresenter
public interface InventoryPresenterInterface
This interface should be implemented by the InventoryPresenter class
It represents the data that should be formatted and displayed by the view
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addItem
(boolean isSuccessful, ItemDetails itemDetails) Sends a message to update the view about an added itemvoid
inventoryDetails
(ItemDetails[] allItemsDetails) Sends a message to the view about the state of every item type in the inventoryvoid
removeItem
(boolean isSuccessful, ItemDetails itemDetails) Sends a message to update the view about a removed itemvoid
useItem
(boolean isSuccessful, String characterName, ItemDetails itemDetails) Sends a message to update the view about a used item
-
Method Details
-
addItem
Sends a message to update the view about an added item- Parameters:
isSuccessful
- if an item of itemName was added to the inventoryitemDetails
- the state of the item that was potentially used- See Also:
-
removeItem
Sends a message to update the view about a removed item- Parameters:
isSuccessful
- if an item of itemName was removed from the inventoryitemDetails
- the state of the item that was potentially used- See Also:
-
useItem
Sends a message to update the view about a used item- Parameters:
isSuccessful
- if an item of itemName was used in the inventorycharacterName
- the name of character the item was attempted to be used onitemDetails
- the state of the item that was potentially used- See Also:
-
inventoryDetails
Sends a message to the view about the state of every item type in the inventory- Parameters:
allItemsDetails
- a list of object that represent a state of single item type in the inventory- See Also:
-