Implemented case insensitive search display of remittee name (so that e.g. for 'John Doe' and 'JOHN DOE' not two different entries are displayed)
This commit is contained in:
parent
3e2b4757df
commit
17b3066044
|
@ -11,6 +11,25 @@ data class Remittee(
|
||||||
internal constructor() : this("", "", "") // for object deserializers
|
internal constructor() : this("", "", "") // for object deserializers
|
||||||
|
|
||||||
|
|
||||||
|
override fun equals(other: Any?): Boolean {
|
||||||
|
if (this === other) return true
|
||||||
|
if (other !is Remittee) return false
|
||||||
|
|
||||||
|
if (name.equals(other.name, true)) return false
|
||||||
|
if (iban != other.iban) return false
|
||||||
|
if (bic != other.bic) return false
|
||||||
|
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun hashCode(): Int {
|
||||||
|
var result = name.toLowerCase().hashCode()
|
||||||
|
result = 31 * result + (iban?.hashCode() ?: 0)
|
||||||
|
result = 31 * result + (bic?.hashCode() ?: 0)
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
override fun toString(): String {
|
override fun toString(): String {
|
||||||
return name
|
return name
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue