package ru.ulstu.datamodel.response; class ControllerResponse { private final D data; private final ControllerResponseError error; ControllerResponse(D data) { this.data = data; this.error = null; } ControllerResponse(ControllerResponseError error) { this.data = null; this.error = error; } public D getData() { return data; } public ControllerResponseError getError() { return error; } }