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