Package main.model.request
Class RequestFactory
java.lang.Object
main.model.request.RequestFactory
A factory class that creates a specific type of Request based on the input parameters.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Request
createRequest
(Map<String, String> map) Creates a Request object based on the input parameters.
-
Constructor Details
-
RequestFactory
public RequestFactory()
-
-
Method Details
-
createRequest
Creates a Request object based on the input parameters.- Parameters:
map
- a Map of key-value pairs representing the parameters of the Request- Returns:
- a Request object of the specified type
- Throws:
IllegalArgumentException
- if the RequestType is not valid or if the input parameters are not valid for the specified RequestType
-