Refactor CommandParser interface to use generic type extending Request #219

Merged
lars.winzer merged 1 commits from feat/33-commandparser-generic-type into main 2026-03-31 19:32:33 +02:00
Showing only changes of commit 3a0248e0c3 - Show all commits
@@ -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);
} }