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 (other !is MobilePhoneTanMedium) return false
|
||||||
if (!super.equals(other)) return false
|
if (!super.equals(other)) return false
|
||||||
|
|
||||||
if (mediumName != other.mediumName) return false
|
|
||||||
if (concealedPhoneNumber != other.concealedPhoneNumber) return false
|
if (concealedPhoneNumber != other.concealedPhoneNumber) return false
|
||||||
if (phoneNumber != other.phoneNumber) return false
|
if (phoneNumber != other.phoneNumber) return false
|
||||||
if (smsDebitAccount != other.smsDebitAccount) return false
|
if (smsDebitAccount != other.smsDebitAccount) return false
|
||||||
|
@ -28,7 +27,6 @@ open class MobilePhoneTanMedium(
|
||||||
|
|
||||||
override fun hashCode(): Int {
|
override fun hashCode(): Int {
|
||||||
var result = super.hashCode()
|
var result = super.hashCode()
|
||||||
result = 31 * result + (mediumName.hashCode())
|
|
||||||
result = 31 * result + (concealedPhoneNumber?.hashCode() ?: 0)
|
result = 31 * result + (concealedPhoneNumber?.hashCode() ?: 0)
|
||||||
result = 31 * result + (phoneNumber?.hashCode() ?: 0)
|
result = 31 * result + (phoneNumber?.hashCode() ?: 0)
|
||||||
result = 31 * result + (smsDebitAccount?.hashCode() ?: 0)
|
result = 31 * result + (smsDebitAccount?.hashCode() ?: 0)
|
||||||
|
|
|
@ -27,7 +27,6 @@ open class TanGeneratorTanMedium(
|
||||||
if (cardType != other.cardType) return false
|
if (cardType != other.cardType) return false
|
||||||
if (validFrom != other.validFrom) return false
|
if (validFrom != other.validFrom) return false
|
||||||
if (validTo != other.validTo) return false
|
if (validTo != other.validTo) return false
|
||||||
if (mediumName != other.mediumName) return false
|
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
@ -39,7 +38,6 @@ open class TanGeneratorTanMedium(
|
||||||
result = 31 * result + (cardType?.hashCode() ?: 0)
|
result = 31 * result + (cardType?.hashCode() ?: 0)
|
||||||
result = 31 * result + (validFrom?.hashCode() ?: 0)
|
result = 31 * result + (validFrom?.hashCode() ?: 0)
|
||||||
result = 31 * result + (validTo?.hashCode() ?: 0)
|
result = 31 * result + (validTo?.hashCode() ?: 0)
|
||||||
result = 31 * result + (mediumName?.hashCode() ?: 0)
|
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,7 @@ open class TanMedium(
|
||||||
|
|
||||||
if (mediumClass != other.mediumClass) return false
|
if (mediumClass != other.mediumClass) return false
|
||||||
if (status != other.status) return false
|
if (status != other.status) return false
|
||||||
|
if (mediumName != other.mediumName) return false
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
@ -36,6 +37,7 @@ open class TanMedium(
|
||||||
override fun hashCode(): Int {
|
override fun hashCode(): Int {
|
||||||
var result = mediumClass.hashCode()
|
var result = mediumClass.hashCode()
|
||||||
result = 31 * result + status.hashCode()
|
result = 31 * result + status.hashCode()
|
||||||
|
result = 31 * result + mediumName.hashCode()
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue