@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAvailabilityZone() == null) ? 0 : getAvailabilityZone().hashCode()); hashCode = prime * hashCode + ((getInstanceType() == null) ? 0 : getInstanceType().hashCode()); hashCode = prime * hashCode + ((getProductDescription() == null) ? 0 : getProductDescription().hashCode()); hashCode = prime * hashCode + ((getSpotPrice() == null) ? 0 : getSpotPrice().hashCode()); hashCode = prime * hashCode + ((getTimestamp() == null) ? 0 : getTimestamp().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 (getAvailabilityZone() != null) sb.append("AvailabilityZone: ").append(getAvailabilityZone()).append(","); if (getInstanceType() != null) sb.append("InstanceType: ").append(getInstanceType()).append(","); if (getProductDescription() != null) sb.append("ProductDescription: ").append(getProductDescription()).append(","); if (getSpotPrice() != null) sb.append("SpotPrice: ").append(getSpotPrice()).append(","); if (getTimestamp() != null) sb.append("Timestamp: ").append(getTimestamp()); sb.append("}"); return sb.toString(); }
if (other.getInstanceType() != null && other.getInstanceType().equals(this.getInstanceType()) == false) return false; if (other.getProductDescription() == null ^ this.getProductDescription() == null) return false; if (other.getProductDescription() != null && other.getProductDescription().equals(this.getProductDescription()) == false) return false; if (other.getSpotPrice() == null ^ this.getSpotPrice() == null)
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getInstanceType() == null) ? 0 : getInstanceType().hashCode()); hashCode = prime * hashCode + ((getProductDescription() == null) ? 0 : getProductDescription().hashCode()); hashCode = prime * hashCode + ((getSpotPrice() == null) ? 0 : getSpotPrice().hashCode()); hashCode = prime * hashCode + ((getTimestamp() == null) ? 0 : getTimestamp().hashCode()); hashCode = prime * hashCode + ((getAvailabilityZone() == null) ? 0 : getAvailabilityZone().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 (getInstanceType() != null) sb.append("InstanceType: " + getInstanceType() + ","); if (getProductDescription() != null) sb.append("ProductDescription: " + getProductDescription() + ","); if (getSpotPrice() != null) sb.append("SpotPrice: " + getSpotPrice() + ","); if (getTimestamp() != null) sb.append("Timestamp: " + getTimestamp() + ","); if (getAvailabilityZone() != null) sb.append("AvailabilityZone: " + getAvailabilityZone() ); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SpotPrice == false) return false; SpotPrice other = (SpotPrice)obj; if (other.getInstanceType() == null ^ this.getInstanceType() == null) return false; if (other.getInstanceType() != null && other.getInstanceType().equals(this.getInstanceType()) == false) return false; if (other.getProductDescription() == null ^ this.getProductDescription() == null) return false; if (other.getProductDescription() != null && other.getProductDescription().equals(this.getProductDescription()) == false) return false; if (other.getSpotPrice() == null ^ this.getSpotPrice() == null) return false; if (other.getSpotPrice() != null && other.getSpotPrice().equals(this.getSpotPrice()) == false) return false; if (other.getTimestamp() == null ^ this.getTimestamp() == null) return false; if (other.getTimestamp() != null && other.getTimestamp().equals(this.getTimestamp()) == false) return false; if (other.getAvailabilityZone() == null ^ this.getAvailabilityZone() == null) return false; if (other.getAvailabilityZone() != null && other.getAvailabilityZone().equals(this.getAvailabilityZone()) == false) return false; return true; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAvailabilityZone() == null) ? 0 : getAvailabilityZone().hashCode()); hashCode = prime * hashCode + ((getInstanceType() == null) ? 0 : getInstanceType().hashCode()); hashCode = prime * hashCode + ((getProductDescription() == null) ? 0 : getProductDescription().hashCode()); hashCode = prime * hashCode + ((getSpotPrice() == null) ? 0 : getSpotPrice().hashCode()); hashCode = prime * hashCode + ((getTimestamp() == null) ? 0 : getTimestamp().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 (getAvailabilityZone() != null) sb.append("AvailabilityZone: ").append(getAvailabilityZone()).append(","); if (getInstanceType() != null) sb.append("InstanceType: ").append(getInstanceType()).append(","); if (getProductDescription() != null) sb.append("ProductDescription: ").append(getProductDescription()).append(","); if (getSpotPrice() != null) sb.append("SpotPrice: ").append(getSpotPrice()).append(","); if (getTimestamp() != null) sb.append("Timestamp: ").append(getTimestamp()); sb.append("}"); return sb.toString(); }
if (other.getInstanceType() != null && other.getInstanceType().equals(this.getInstanceType()) == false) return false; if (other.getProductDescription() == null ^ this.getProductDescription() == null) return false; if (other.getProductDescription() != null && other.getProductDescription().equals(this.getProductDescription()) == false) return false; if (other.getSpotPrice() == null ^ this.getSpotPrice() == null)