Fixed that comparing TanProcedures failed

This commit is contained in:
dankito 2020-09-14 23:25:53 +02:00
parent 4d50b12fa9
commit 68742cc6a3
1 changed files with 22 additions and 0 deletions

View File

@ -18,6 +18,28 @@ open class TanProcedure(
internal constructor() : this("", Sicherheitsfunktion.Einschritt_Verfahren, TanProcedureType.EnterTan) // for object deserializers internal constructor() : this("", Sicherheitsfunktion.Einschritt_Verfahren, TanProcedureType.EnterTan) // for object deserializers
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (other !is TanProcedure) return false
if (displayName != other.displayName) return false
if (securityFunction != other.securityFunction) return false
if (type != other.type) return false
if (nameOfTanMediaRequired != other.nameOfTanMediaRequired) return false
return true
}
override fun hashCode(): Int {
var result = displayName.hashCode()
result = 31 * result + securityFunction.hashCode()
result = 31 * result + type.hashCode()
result = 31 * result + nameOfTanMediaRequired.hashCode()
return result
}
override fun toString(): String { override fun toString(): String {
return "$displayName ($type, ${securityFunction.code})" return "$displayName ($type, ${securityFunction.code})"
} }