src/main/java/com/jmsoftware/datastructuresandalgorithms/common/bean/ResponseBodyBean.java
/**
     * <p>Respond to client with IUniversalStatus and data.</p>
     * <p><strong>ATTENTION:</strong></p>
     * <p>This method CANNOT be used by controller or service or other class, only provided for Exception controller
     * .</p>
     *
     * @param <ResponseBodyDataType> the response body data type
     * @param status                 IUniversalStatus
     * @param data                   data to be responded to client
     * @return response body for ExceptionControllerAdvice
     */
Respond to client with IUniversalStatus and data.
ATTENTION:
This method CANNOT be used by controller or service or other class, only provided for Exception controller
.

@param  the response body data type
@param status                 IUniversalStatus
@param data                   data to be responded to client
@return response body for ExceptionControllerAdvice
Respond to client with IUniversalStatus and data . ATTENTION : This method CANNOT be used by controller or service or other class only provided for Exception controller . @param the response body data type @param status IUniversalStatus @param data data to be responded to client @return response body for ExceptionControllerAdvice
public static <ResponseBodyDataType> ResponseBodyBean<ResponseBodyDataType> ofStatus(@NonNull final IUniversalStatus status,
                                                                                                                        @NonNull final ResponseBodyDataType data) {
        return ResponseBodyBean.<ResponseBodyDataType>builder()
                .timestamp(new Date())
                .status(status.getCode())
                .message(status.getMessage())
                .data(data)
                .build();
    }
public static < ResponseBodyDataType > ResponseBodyBean < ResponseBodyDataType > ofStatus ( @ NonNull final IUniversalStatus status , @ NonNull final ResponseBodyDataType data ) { return ResponseBodyBean . < ResponseBodyDataType > builder ( ) . timestamp ( new Date ( ) ) . status ( status . getCode ( ) ) . message ( status . getMessage ( ) ) . data ( data ) . build ( ) ; }
<p>Respond to client with IUniversalStatus and data.</p>
 <p><strong>ATTENTION:</strong></p>
 <p>This method CANNOT be used by controller or service or other class, only provided for Exception controller
 .</p>
<p > Respond to client with IUniversalStatus and data . < / p > <p > <strong > ATTENTION : < / strong > < / p > <p > This method CANNOT be used by controller or service or other class only provided for Exception controller . < / p >