Class OperationResult<SuccessTypeT,FailureTypeT>
- java.lang.Object
- 
- com.mongodb.stitch.core.internal.common.OperationResult<SuccessTypeT,FailureTypeT>
 
- 
 public final class OperationResult<SuccessTypeT,FailureTypeT> extends Object 
- 
- 
Method SummaryModifier and Type Method Description static <T,U>
 OperationResult<T,U>failedResultOf(U value)SuccessTypeTgeResult()Gets the result of the operation, if successful.FailureTypeTgetFailure()Gets the failure reason for the operation, if it failed.booleanisSuccessful()static <T,U>
 OperationResult<T,U>successfulResultOf(T value)
 
- 
- 
- 
Method Detail- 
successfulResultOfpublic static <T,U> OperationResult<T,U> successfulResultOf(T value) 
 - 
failedResultOfpublic static <T,U> OperationResult<T,U> failedResultOf(U value) 
 - 
isSuccessfulpublic boolean isSuccessful() 
 - 
geResultpublic SuccessTypeT geResult() Gets the result of the operation, if successful.- Returns:
- The result of the operation.
 
 - 
getFailurepublic FailureTypeT getFailure() Gets the failure reason for the operation, if it failed.- Returns:
- The failure reason of the operation.
 
 
- 
 
-