T
- Type of the result
.public interface Response<T>
Modifier and Type | Method and Description |
---|---|
Object |
getError()
Returns the error for this response.
|
T |
getResult()
Returns the result for this response.
|
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(T pResult)
Sets the result for this response and marks the response as valid.
|
boolean |
wasCancelled()
Checks if this Response was cancelled.
|
boolean isValid()
boolean wasCancelled()
void setError(Object pError)
pError
- error object, may be nullObject getError()
void setResult(T pResult)
pResult
- result object, may be nullT getResult()
Copyright © 2017 Jürgen Zeller (privat). All rights reserved.