public class KeyResult
extends java.lang.Object
| Constructor and Description |
|---|
KeyResult()
Construct a valueless Key Result - used as the done marker without an exception
|
KeyResult(java.lang.Exception e)
Construct a key result containing an exception
|
KeyResult(java.lang.String key)
Construct a key result for a specific key
|
| Modifier and Type | Method and Description |
|---|---|
@Nullable java.lang.Exception |
getException()
Get the exception in this result
|
@Nullable java.lang.String |
getKey()
Get the key in this result
|
boolean |
isDone()
If there is no key, the result indicates the consume is done, even if there is an exception.
|
boolean |
isException()
Whether this result is an exception
|
boolean |
isKey()
Whether this result is a key.
|
public KeyResult()
public KeyResult(java.lang.String key)
key - the keypublic KeyResult(java.lang.Exception e)
e - the exceptionpublic @Nullable java.lang.String getKey()
public @Nullable java.lang.Exception getException()
public boolean isKey()
public boolean isException()
public boolean isDone()