T - The type of the successful result object.public class Result<T> extends Object
| Constructor and Description |
|---|
Result(Exception failure)
Creates a failure result object.
|
Result(Y value)
Creates a successful result object.
|
public Result(Exception failure)
failure - An exception representing the failurepublic Result(Y value)
Y - The type of the result object.value - The object representing the result of the operation.public Exception getFailure()
public T getValue()
public boolean isSuccess()
public boolean isFailure()