public final class Result
extends java.lang.Object
| Constructor and Description |
|---|
Result(java.lang.Object value,
java.lang.Throwable exception)
Creates a new result with the specified return
value and exception.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Throwable |
getException()
Returns the value of the exception.
|
java.lang.Object |
getValue()
Returns the return value of the service result.
|
boolean |
hasException()
Determines whether the service result has an exception.
|
java.lang.String |
toString()
Returns a string representation of the result.
|
public Result(java.lang.Object value,
java.lang.Throwable exception)
value - The return value.exception - The exception.public boolean hasException()
public java.lang.Throwable getException()
public java.lang.Object getValue()
public java.lang.String toString()
toString in class java.lang.Object