Package org.progettoedids.repositories
Class ItemRepository
java.lang.Object
org.progettoedids.repositories.ItemRepository
ItemRepository holds a factory method that produces various subtypes of Items(s)
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ItemRepository
public ItemRepository()
-
-
Method Details
-
getItem
Creates a specific Item subtype based on its system name and returns it as an Item- Parameters:
itemSystemName- a String representing the system name of an Item. Must not be null- Returns:
- a newly created instance of an Item
- Throws:
IllegalArgumentException- if the system name passed as an argument couldn't be matched to a specific Item subtype
-