Module org.elasticsearch.server
Package org.elasticsearch.common.util
Class Result<V,E extends Exception>
java.lang.Object
org.elasticsearch.common.util.Result<V,E>
- All Implemented Interfaces:
CheckedSupplier<V,
E>
A wrapper around either
- a successful result of parameterized type
V
- a failure with exception type
E
-
Method Summary
-
Method Details
-
of
-
failure
-
get
- Specified by:
get
in interfaceCheckedSupplier<V,
E extends Exception> - Throws:
E
-
failure
-
isSuccessful
public abstract boolean isSuccessful() -
isFailure
public boolean isFailure() -
asOptional
-