@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getFaceRecords() == null) ? 0 : getFaceRecords().hashCode()); hashCode = prime * hashCode + ((getOrientationCorrection() == null) ? 0 : getOrientationCorrection().hashCode()); hashCode = prime * hashCode + ((getFaceModelVersion() == null) ? 0 : getFaceModelVersion().hashCode()); hashCode = prime * hashCode + ((getUnindexedFaces() == null) ? 0 : getUnindexedFaces().hashCode()); return hashCode; }
/** * 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 (getFaceRecords() != null) sb.append("FaceRecords: ").append(getFaceRecords()).append(","); if (getOrientationCorrection() != null) sb.append("OrientationCorrection: ").append(getOrientationCorrection()).append(","); if (getFaceModelVersion() != null) sb.append("FaceModelVersion: ").append(getFaceModelVersion()).append(","); if (getUnindexedFaces() != null) sb.append("UnindexedFaces: ").append(getUnindexedFaces()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof IndexFacesResult == false) return false; IndexFacesResult other = (IndexFacesResult) obj; if (other.getFaceRecords() == null ^ this.getFaceRecords() == null) return false; if (other.getFaceRecords() != null && other.getFaceRecords().equals(this.getFaceRecords()) == false) return false; if (other.getOrientationCorrection() == null ^ this.getOrientationCorrection() == null) return false; if (other.getOrientationCorrection() != null && other.getOrientationCorrection().equals(this.getOrientationCorrection()) == false) return false; if (other.getFaceModelVersion() == null ^ this.getFaceModelVersion() == null) return false; if (other.getFaceModelVersion() != null && other.getFaceModelVersion().equals(this.getFaceModelVersion()) == false) return false; if (other.getUnindexedFaces() == null ^ this.getUnindexedFaces() == null) return false; if (other.getUnindexedFaces() != null && other.getUnindexedFaces().equals(this.getUnindexedFaces()) == false) return false; return true; }