mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-13 00:21:28 +00:00
25 lines
586 B
Plaintext
Vendored
25 lines
586 B
Plaintext
Vendored
class Test {
|
|
var serial: String = ""
|
|
set(value) {
|
|
field = value.toUpperCase()
|
|
}
|
|
var name: String = ""
|
|
<caret>override fun equals(other: Any?): Boolean {
|
|
if (this === other) return true
|
|
if (javaClass != other?.javaClass) return false
|
|
|
|
other as Test
|
|
|
|
if (serial != other.serial) return false
|
|
if (name != other.name) return false
|
|
|
|
return true
|
|
}
|
|
|
|
override fun hashCode(): Int {
|
|
var result = serial.hashCode()
|
|
result = 31 * result + name.hashCode()
|
|
return result
|
|
}
|
|
|
|
} |