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