Refactor: Update CommandParser interface to use generic type
This commit is contained in:
+2
-2
@@ -7,12 +7,12 @@ import ch.unibas.dmi.dbis.cs108.casono.server.network.protocol.request.Request;
|
|||||||
* Parser to convert the PrimitiveRequest to a Request and performing checks for required fields and
|
* Parser to convert the PrimitiveRequest to a Request and performing checks for required fields and
|
||||||
* data types
|
* data types
|
||||||
*/
|
*/
|
||||||
public interface CommandParser {
|
public interface CommandParser<T extends Request> {
|
||||||
/**
|
/**
|
||||||
* Parses the provided PrimitiveRequest into a command-specific request
|
* Parses the provided PrimitiveRequest into a command-specific request
|
||||||
*
|
*
|
||||||
* @param primitiveRequest
|
* @param primitiveRequest
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Request parse(PrimitiveRequest primitiveRequest);
|
T parse(PrimitiveRequest primitiveRequest);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user