Added mediumName to hashCode() and equals()
This commit is contained in:
parent
05322aface
commit
8dc2174081
|
@ -18,7 +18,6 @@ open class MobilePhoneTanMedium(
|
|||
if (other !is MobilePhoneTanMedium) return false
|
||||
if (!super.equals(other)) return false
|
||||
|
||||
if (mediumName != other.mediumName) return false
|
||||
if (concealedPhoneNumber != other.concealedPhoneNumber) return false
|
||||
if (phoneNumber != other.phoneNumber) return false
|
||||
if (smsDebitAccount != other.smsDebitAccount) return false
|
||||
|
@ -28,7 +27,6 @@ open class MobilePhoneTanMedium(
|
|||
|
||||
override fun hashCode(): Int {
|
||||
var result = super.hashCode()
|
||||
result = 31 * result + (mediumName.hashCode())
|
||||
result = 31 * result + (concealedPhoneNumber?.hashCode() ?: 0)
|
||||
result = 31 * result + (phoneNumber?.hashCode() ?: 0)
|
||||
result = 31 * result + (smsDebitAccount?.hashCode() ?: 0)
|
||||
|
|
|
@ -27,7 +27,6 @@ open class TanGeneratorTanMedium(
|
|||
if (cardType != other.cardType) return false
|
||||
if (validFrom != other.validFrom) return false
|
||||
if (validTo != other.validTo) return false
|
||||
if (mediumName != other.mediumName) return false
|
||||
|
||||
return true
|
||||
}
|
||||
|
@ -39,7 +38,6 @@ open class TanGeneratorTanMedium(
|
|||
result = 31 * result + (cardType?.hashCode() ?: 0)
|
||||
result = 31 * result + (validFrom?.hashCode() ?: 0)
|
||||
result = 31 * result + (validTo?.hashCode() ?: 0)
|
||||
result = 31 * result + (mediumName?.hashCode() ?: 0)
|
||||
return result
|
||||
}
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@ open class TanMedium(
|
|||
|
||||
if (mediumClass != other.mediumClass) return false
|
||||
if (status != other.status) return false
|
||||
if (mediumName != other.mediumName) return false
|
||||
|
||||
return true
|
||||
}
|
||||
|
@ -36,6 +37,7 @@ open class TanMedium(
|
|||
override fun hashCode(): Int {
|
||||
var result = mediumClass.hashCode()
|
||||
result = 31 * result + status.hashCode()
|
||||
result = 31 * result + mediumName.hashCode()
|
||||
return result
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue