Exemple #1
0
 @Override
 public String toString() {
   return MoreObjects.toStringHelper(this) //
       .add("date", date) //
       .add("from", fromcur.getCode()) //
       .add("to", tocur.getCode()) //
       .add("value", value)
       .toString();
 }
Exemple #2
0
  @Override
  public boolean equals(Object obj) {
    if (this == obj) return true;

    if (obj == null || !(obj instanceof RateEntity)) return false;

    RateEntity other = (RateEntity) obj;

    return date.compareTo(other.date) == 0 //
        && Objects.equals(fromcur.getCode(), other.fromcur.getCode()) //
        && Objects.equals(tocur.getCode(), other.tocur.getCode()) //
        && value.compareTo(other.value) == 0;
  }
Exemple #3
0
 @Override
 public int hashCode() {
   return Objects.hash(date, fromcur.getCode(), tocur.getCode(), value);
 }