@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTextDetections() == null) ? 0 : getTextDetections().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DetectTextResult == false) return false; DetectTextResult other = (DetectTextResult) obj; if (other.getTextDetections() == null ^ this.getTextDetections() == null) return false; if (other.getTextDetections() != null && other.getTextDetections().equals(this.getTextDetections()) == false) return false; return true; }
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getTextDetections() != null) sb.append("TextDetections: ").append(getTextDetections()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTextDetections() == null) ? 0 : getTextDetections().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DetectTextResult == false) return false; DetectTextResult other = (DetectTextResult) obj; if (other.getTextDetections() == null ^ this.getTextDetections() == null) return false; if (other.getTextDetections() != null && other.getTextDetections().equals(this.getTextDetections()) == false) return false; return true; } }
/** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getTextDetections() != null) sb.append("TextDetections: " + getTextDetections()); sb.append("}"); return sb.toString(); }
/** * <p> * An array of text that was detected in the input image. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param textDetections <p> * An array of text that was detected in the input image. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public DetectTextResult withTextDetections(TextDetection... textDetections) { if (getTextDetections() == null) { this.textDetections = new java.util.ArrayList<TextDetection>(textDetections.length); } for (TextDetection value : textDetections) { this.textDetections.add(value); } return this; }