예제 #1
0
 @Override
 public int hashCode() {
   int result = btcPubKey != null ? Arrays.hashCode(btcPubKey) : 0;
   result = 31 * result + (pubKeyRing != null ? pubKeyRing.hashCode() : 0);
   result = 31 * result + (arbitratorAddress != null ? arbitratorAddress.hashCode() : 0);
   result = 31 * result + (languageCodes != null ? languageCodes.hashCode() : 0);
   result = 31 * result + (btcAddress != null ? btcAddress.hashCode() : 0);
   result = 31 * result + (int) (registrationDate ^ (registrationDate >>> 32));
   result = 31 * result + (registrationSignature != null ? registrationSignature.hashCode() : 0);
   result = 31 * result + (registrationPubKey != null ? Arrays.hashCode(registrationPubKey) : 0);
   return result;
 }
예제 #2
0
  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (!(o instanceof Arbitrator)) return false;

    Arbitrator that = (Arbitrator) o;

    if (registrationDate != that.registrationDate) return false;
    if (!Arrays.equals(btcPubKey, that.btcPubKey)) return false;
    if (pubKeyRing != null ? !pubKeyRing.equals(that.pubKeyRing) : that.pubKeyRing != null)
      return false;
    if (arbitratorAddress != null
        ? !arbitratorAddress.equals(that.arbitratorAddress)
        : that.arbitratorAddress != null) return false;
    if (languageCodes != null
        ? !languageCodes.equals(that.languageCodes)
        : that.languageCodes != null) return false;
    if (btcAddress != null ? !btcAddress.equals(that.btcAddress) : that.btcAddress != null)
      return false;
    if (registrationSignature != null
        ? !registrationSignature.equals(that.registrationSignature)
        : that.registrationSignature != null) return false;
    return Arrays.equals(registrationPubKey, that.registrationPubKey);
  }