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()
Response
public boolean wasCancelled()
Response
wasCancelled
in interface Response<T>
public void setError(Object pError)
Response
public Object getError()
Response
public void setResult(Object pResponse)
Response
public T getResult()
Response
Copyright © 2017 Jürgen Zeller (privat). All rights reserved.