Refactor: Update CommandParser interface to use generic type

This commit is contained in:
Lars Simon Winzer
2026-03-31 19:29:08 +02:00
parent 595800a469
commit 3a0248e0c3
@@ -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
* data types
*/
public interface CommandParser {
public interface CommandParser<T extends Request> {
/**
* Parses the provided PrimitiveRequest into a command-specific request
*
* @param primitiveRequest
* @return
*/
Request parse(PrimitiveRequest primitiveRequest);
T parse(PrimitiveRequest primitiveRequest);
}