@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); hashCode = prime * hashCode + ((getX() == null) ? 0 : getX().hashCode()); hashCode = prime * hashCode + ((getY() == null) ? 0 : getY().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 (getType() != null) sb.append("Type: ").append(getType()).append(","); if (getX() != null) sb.append("X: ").append(getX()).append(","); if (getY() != null) sb.append("Y: ").append(getY()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Landmark == false) return false; Landmark other = (Landmark) obj; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == false) return false; if (other.getX() == null ^ this.getX() == null) return false; if (other.getX() != null && other.getX().equals(this.getX()) == false) return false; if (other.getY() == null ^ this.getY() == null) return false; if (other.getY() != null && other.getY().equals(this.getY()) == false) return false; return true; }
/** * Marshall the given parameter object. */ public void marshall(Landmark landmark, ProtocolMarshaller protocolMarshaller) { if (landmark == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(landmark.getType(), TYPE_BINDING); protocolMarshaller.marshall(landmark.getX(), X_BINDING); protocolMarshaller.marshall(landmark.getY(), Y_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); hashCode = prime * hashCode + ((getX() == null) ? 0 : getX().hashCode()); hashCode = prime * hashCode + ((getY() == null) ? 0 : getY().hashCode()); return hashCode; }
/** * 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 (getType() != null) sb.append("Type: " + getType() + ","); if (getX() != null) sb.append("X: " + getX() + ","); if (getY() != null) sb.append("Y: " + getY()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Landmark == false) return false; Landmark other = (Landmark) obj; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == false) return false; if (other.getX() == null ^ this.getX() == null) return false; if (other.getX() != null && other.getX().equals(this.getX()) == false) return false; if (other.getY() == null ^ this.getY() == null) return false; if (other.getY() != null && other.getY().equals(this.getY()) == false) return false; return true; } }
public void marshall(Landmark landmark, AwsJsonWriter jsonWriter) throws Exception { jsonWriter.beginObject(); if (landmark.getType() != null) { String type = landmark.getType(); jsonWriter.name("Type"); jsonWriter.value(type); } if (landmark.getX() != null) { Float x = landmark.getX(); jsonWriter.name("X"); jsonWriter.value(x); } if (landmark.getY() != null) { Float y = landmark.getY(); jsonWriter.name("Y"); jsonWriter.value(y); } jsonWriter.endObject(); }