T
- type of the valueE
- type of the exceptionpublic class Result<T,E extends java.lang.Exception>
extends java.lang.Object
Constructor and Description |
---|
Result()
Constructor for result without initial value.
|
Result(T initialValue)
Constructor for result with initial value.
|
Modifier and Type | Method and Description |
---|---|
E |
getException()
Get the exception.
|
T |
getValue()
Get the value.
|
boolean |
isDone()
Check whether it is actually done.
|
void |
setDone()
Set done without setting anything else.
|
void |
setDone(E exception)
Set done and provide an exception.
|
void |
setDone(T value)
Set done and provide a result.
|
void |
setDone(T value,
E exception)
Set done and set both result and exception.
|
public Result()
public Result(T initialValue)
initialValue
- initial valuepublic boolean isDone()
public void setDone()
public void setDone(T value)
value
- the resultpublic void setDone(E exception)
exception
- the exceptionpublic void setDone(T value, E exception)
value
- the valueexception
- the exceptionpublic T getValue()
public E getException()
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.