A Result can be used to store the result of an operation. The operation can either be successful or considered as a failure.
This class has been proposed by Khalil Stemmler.
Results are immutable
specfield
isFailure (boolean): determines whether or not the operation has failed
specfield
isSuccess (boolean): determines whether or not the operation is successful
specfield
error (Error) : contains the error causing the failure (if the operation failed)
specfield
value (T) : contains the result of the operation (if it is successful)
A
Resultcan be used to store the result of an operation. The operation can either be successful or considered as a failure. This class has been proposed by Khalil Stemmler.Results are immutable
isFailure (boolean): determines whether or not the operation has failed
isSuccess (boolean): determines whether or not the operation is successful
error (Error) : contains the error causing the failure (if the operation failed)
value (
T) : contains the result of the operation (if it is successful)