@Override
  public final boolean equals(Object obj) {
    if (obj == this) {
      return true;
    }
    if (obj == null || !obj.getClass().equals(Detection.class)) {
      return false;
    }
    Detection other = (Detection) obj;
    return Objects.equals(language, other.language) && Objects.equals(confidence, other.confidence);
  }
Returns an optional confidence value in the interval [0,1]. The closer this value is to 1, the
higher the confidence level for the language detection. Note that this value is not always
available.
java-translate/google-cloud-translate/src/main/java/com/google/cloud/translate/Detection.java