@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getHourlyPrice() == null) ? 0 : getHourlyPrice().hashCode()); hashCode = prime * hashCode + ((getRemainingTotalValue() == null) ? 0 : getRemainingTotalValue().hashCode()); hashCode = prime * hashCode + ((getRemainingUpfrontValue() == null) ? 0 : getRemainingUpfrontValue().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 (getHourlyPrice() != null) sb.append("HourlyPrice: ").append(getHourlyPrice()).append(","); if (getRemainingTotalValue() != null) sb.append("RemainingTotalValue: ").append(getRemainingTotalValue()).append(","); if (getRemainingUpfrontValue() != null) sb.append("RemainingUpfrontValue: ").append(getRemainingUpfrontValue()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ReservationValue == false) return false; ReservationValue other = (ReservationValue) obj; if (other.getHourlyPrice() == null ^ this.getHourlyPrice() == null) return false; if (other.getHourlyPrice() != null && other.getHourlyPrice().equals(this.getHourlyPrice()) == false) return false; if (other.getRemainingTotalValue() == null ^ this.getRemainingTotalValue() == null) return false; if (other.getRemainingTotalValue() != null && other.getRemainingTotalValue().equals(this.getRemainingTotalValue()) == false) return false; if (other.getRemainingUpfrontValue() == null ^ this.getRemainingUpfrontValue() == null) return false; if (other.getRemainingUpfrontValue() != null && other.getRemainingUpfrontValue().equals(this.getRemainingUpfrontValue()) == false) return false; return true; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getHourlyPrice() == null) ? 0 : getHourlyPrice().hashCode()); hashCode = prime * hashCode + ((getRemainingTotalValue() == null) ? 0 : getRemainingTotalValue().hashCode()); hashCode = prime * hashCode + ((getRemainingUpfrontValue() == null) ? 0 : getRemainingUpfrontValue().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 (getHourlyPrice() != null) sb.append("HourlyPrice: ").append(getHourlyPrice()).append(","); if (getRemainingTotalValue() != null) sb.append("RemainingTotalValue: ").append(getRemainingTotalValue()).append(","); if (getRemainingUpfrontValue() != null) sb.append("RemainingUpfrontValue: ").append(getRemainingUpfrontValue()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ReservationValue == false) return false; ReservationValue other = (ReservationValue) obj; if (other.getHourlyPrice() == null ^ this.getHourlyPrice() == null) return false; if (other.getHourlyPrice() != null && other.getHourlyPrice().equals(this.getHourlyPrice()) == false) return false; if (other.getRemainingTotalValue() == null ^ this.getRemainingTotalValue() == null) return false; if (other.getRemainingTotalValue() != null && other.getRemainingTotalValue().equals(this.getRemainingTotalValue()) == false) return false; if (other.getRemainingUpfrontValue() == null ^ this.getRemainingUpfrontValue() == null) return false; if (other.getRemainingUpfrontValue() != null && other.getRemainingUpfrontValue().equals(this.getRemainingUpfrontValue()) == false) return false; return true; }