Merge branch 'feat/33-commandparser-generic-type' into 'main'

Refactor CommandParser interface to use generic type extending Request

Closes #33

See merge request cs108-fs26/Gruppe-13!63
This commit was merged in pull request #219.
This commit is contained in:
Lars Simon Winzer
2026-03-31 19:32:33 +02:00
@@ -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);
} }