Package com.sportdataapi.util
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.
-
Constructor Details
-
Method Details
-
getQuery
Returns the query.- Returns:
- the query
-
setQuery
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
Returns the data.- Returns:
- the data
-
setData
Sets the data.- Parameters:
data
- - the data to set
-