R - type of result.E - exception encountered in generating the result.public interface OptionalResult<R,E extends Throwable>
If a result is present, get() will return it otherwise get() will throw the exception that was encountered in the process of generating the result.
| Modifier and Type | Method and Description |
|---|---|
R |
get()
Returns the result or throws an exception if there is no
valid result.
|
boolean |
hasValidResult()
Returns true if there is a valid result.
|
R get()
boolean hasValidResult()
Copyright © 2015. All rights reserved.