Class Response<T>

java.lang.Object
com.sportdataapi.util.Response<T>

public class Response<T>
extends java.lang.Object
API Response Object
Author:
ralph
  • Constructor Summary

    Constructors 
    Constructor Description
    Response()
    Constructor.
    Response​(ResponseQuery query, T data)
    Constructor.
  • Method Summary

    Modifier and Type Method Description
    T getData()
    Returns the data.
    ResponseQuery getQuery()
    Returns the query.
    boolean hasErrors()
    Returns whether the response has errors.
    void setData​(T data)
    Sets the data.
    void setQuery​(ResponseQuery query)
    Sets the query.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Response

      public Response()
      Constructor.
    • Response

      public Response​(ResponseQuery query, T data)
      Constructor.
      Parameters:
      query - - the query object for the response
      data - - the data object for the response
  • Method Details

    • getQuery

      public ResponseQuery getQuery()
      Returns the query.
      Returns:
      the query
    • setQuery

      public void setQuery​(ResponseQuery query)
      Sets the query.
      Parameters:
      query - - the query to set
    • hasErrors

      public boolean hasErrors()
      Returns whether the response has errors.
      Returns:
      true when the response returned errors.
    • getData

      public T getData()
      Returns the data.
      Returns:
      the data
    • setData

      public void setData​(T data)
      Sets the data.
      Parameters:
      data - - the data to set