Translates Foundation result to Chat SDK result.

@param result Foundation result.
@return Chat SDK result.
492880
public ChatResult adaptResult(ComapiResult<?> result) {

        return new ChatResult(result.isSuccessful(), result.isSuccessful() ? null : new ChatResult.Error(result));
    }
976561
public static String composeMessage(List<ValidationResult> results) {
		StringBuilder builder = new StringBuilder();
		builder.append("Validation failed");

		if (results != null && results.size() > 0) {
			boolean first = true;
			for (ValidationResult result : results) {
				if (result.getType() != ValidationResultType.Information) {
					if (!first)
						builder.append(": ");
					else
						builder.append(", ");
					builder.append(result.getMessage());
					first = false;
				}
			}
		}

		return builder.toString();
	}
1305192
@Override
  public FutureResultImpl<T> setResult(T result) {
    this.result = result;
    succeeded = true;
    checkCallHandler();
    return this;
  }
1074924
private Map processEvent(MatchResult result) {
    Map map = new HashMap();
    //group zero is the entire match - process all other groups
    for (int i = 1; i < result.groupCount() + 1; i++) {
      Object key = matchingKeywords.get(i - 1);
      Object value = result.group(i);
      map.put(key, value);

    }
    return map;
  }
1067934
protected String getPdate(Map result) {

        HashMap management = getObjectOr(result, "management", new HashMap());
        ArrayList<HashMap> events = getObjectOr(management, "events", new ArrayList<HashMap>());
        for (HashMap event : events) {
            if (getValueOr(event, "event", "").equals("planting")) {
                return getValueOr(event, "date", "");
            }
        }

        return "";
    }
130933
Observable<ChatResult> handleConversationCreated(ComapiResult<ConversationDetails> result) {
        if (result.isSuccessful()) {
            return persistenceController.upsertConversation(ChatConversation.builder().populate(result.getResult(), result.getETag()).build()).map(success -> adapter.adaptResult(result, success));
        } else {
            return Observable.fromCallable(() -> adapter.adaptResult(result));
        }
    }
1162576
public boolean copyMessageToResult(javax.xml.transform.Result resultTarget)
   {
       Node tree = this.getDOM();
       return Utility.copyTreeToResult(tree, resultTarget);
   }
1260260
public static <T> CollectionUpdateResult<T> noop(T result) {
    return new CollectionUpdateResult<>(Status.NOOP, result);
  }
1281491
function GetSpeech(result) {
  if (!data.speakText) return;
  result.speakText = "Equation";
  if (data.format !== "MathML") result.speakText = data.math;
  else {
    var jax = MathJax.Hub.getAllJax()[0];
    if (jax.root.alttext) result.speakText = jax.root.alttext;
  }
}
1228972
public void setResult(java.util.Collection<WorkspacesIpGroup> result) {
        if (result == null) {
            this.result = null;
            return;
        }

        this.result = new com.amazonaws.internal.SdkInternalList<WorkspacesIpGroup>(result);
    }
1326449
public void renderSoapHeader(final Map<String, String> context, final Result result) {
		renderSoapHeader(RESULT_MARSHALLER, context, result);
	}
706017
protected ExecutionResult postExecute(ExecutionResult result) {
    if (isFailure(result)) {
      result = onFailure(result.with(false, false));
      callFailureListener(result);
    } else {
      result = result.with(true, true);
      onSuccess(result);
      callSuccessListener(result);
    }

    return result;
  }
1187727
public String buildResultsInfoMessageAndClose(FeatureIndexResults results, Projection projection) {
        return buildResultsInfoMessageAndClose(results, 0, null, projection);
    }
642376
public <T> Future<T> submit(Runnable runnable, T result) {
        return mService.submit(runnable, result);
    }
574572
@Nullable
    public Object getResult(TBase<?, ?> result) throws TException {
        for (TFieldIdEnum fieldIdEnum : exceptionFields()) {
            if (ThriftFieldAccess.isSet(result, fieldIdEnum)) {
                throw (TException) ThriftFieldAccess.get(result, fieldIdEnum);
            }
        }

        final TFieldIdEnum successField = successField();
        if (successField == null) { //void method
            return null;
        } else if (ThriftFieldAccess.isSet(result, successField)) {
            return ThriftFieldAccess.get(result, successField);
        } else {
            throw new TApplicationException(
                    TApplicationException.MISSING_RESULT,
                    result.getClass().getName() + '.' + successField.getFieldName());
        }
    }
1148631
private void addResult(ValidationResult result) {
		if (result == null || result.count() == 0) {
			return;
		}
		this.results.add(result);
	}
735368
private void disposeSignInResult(SignInResult result) {
        if (result == null) {
            HMSAgentLog.e("result is null");
            onSignInResult(HMSAgent.AgentResultCode.RESULT_IS_NULL, null);
            return;
        }

        Status status = result.getStatus();
        if (status == null) {
            HMSAgentLog.e("status is null");
            onSignInResult(HMSAgent.AgentResultCode.STATUS_IS_NULL, null);
            return;
        }

        int rstCode = status.getStatusCode();
        HMSAgentLog.d("status=" + status);
        // 需要重试的错误码，并且可以重试
        if ((rstCode == CommonCode.ErrorCode.SESSION_INVALID
                || rstCode == CommonCode.ErrorCode.CLIENT_API_INVALID) && retryTimes > 0) {
            retryTimes--;
            connect();
        } else {
            disposeObtainedResult(result, rstCode);
        }
    }