Package org.progettoedids.repositories
Class RoomRepository
java.lang.Object
org.progettoedids.repositories.RoomRepository
RoomRepository holds a factory method that produces various subtypes of Room(s)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RoomgetRoomFromSymbol(char roomSystemSymbol) Creates a specific Room subtype based on its char symbol and returns it as a Room
-
Constructor Details
-
RoomRepository
public RoomRepository()
-
-
Method Details
-
getRoomFromSymbol
Creates a specific Room subtype based on its char symbol and returns it as a Room- Parameters:
roomSystemSymbol- the symbol representing the specific subtype of Room- Returns:
- a newly created instance of a Room
- Throws:
IllegalArgumentException- if the char symbol passed as an argument couldn't be matched to a specific Room subtype
-