| Constructor and Description |
|---|
DefaultResponse()
Creates an invalid response with a null error object that was not cancelled.
|
DefaultResponse(boolean pWasCancelled)
Creates an invalid response with a null error object.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object pOther) |
Object |
getError()
Returns the error for this response.
|
T |
getResult()
Returns the result for this response.
|
int |
hashCode() |
boolean |
isValid()
Checks if this Response contains a valid result.
|
void |
setError(Object pError)
Sets the error for this response and marks the response as invalid.
|
void |
setResult(Object pResponse)
Sets the result for this response and marks the response as valid.
|
String |
toString() |
boolean |
wasCancelled()
Checks if this Response was cancelled.
|
public DefaultResponse()
public DefaultResponse(boolean pWasCancelled)
pWasCancelled - true if the request was cancelledpublic boolean isValid()
Responsepublic boolean wasCancelled()
ResponsewasCancelled in interface Response<T>public void setError(Object pError)
Responsepublic Object getError()
Responsepublic void setResult(Object pResponse)
Responsepublic T getResult()
ResponseCopyright © 2017 Jürgen Zeller (privat). All rights reserved.