tomtau
05/23/2018, 9:52 AMdiego-gomez-olvera
05/23/2018, 10:23 AMdiego-gomez-olvera
05/23/2018, 10:25 AMtomtau
05/24/2018, 1:28 AMdata class Example(val y: Int) {
var x: Int = 0
}
?diego-gomez-olvera
05/24/2018, 7:50 AMdiego-gomez-olvera
05/24/2018, 7:51 AMdata
classestomtau
05/25/2018, 2:16 AM@GenEqualsIgnore(
[EqualsIgnore(["id"]),
EqualsIgnore(["outsideConstructor"])]
)
data class Test(val id: Long, val date: Long, val count: Int, val test: ByteArray) {
var outsideConstructor = 1
}
tomtau
05/25/2018, 2:16 AMfun Test.equalsIgnore_id(other: Test): Boolean {
if (this === other) return true
if (this.outsideConstructor != other.outsideConstructor) return false
if (this.date != other.date) return false
if (this.count != other.count) return false
if (!Arrays.equals(this.test, other.test)) return false
return true
}
fun Test.equalsIgnore_outsideConstructor(other: Test): Boolean {
if (this === other) return true
if (this.id != other.id) return false
if (this.date != other.date) return false
if (this.count != other.count) return false
if (!Arrays.equals(this.test, other.test)) return false
return true
}
tomtau
05/25/2018, 2:17 AMdiego-gomez-olvera
05/25/2018, 7:56 AMdiego-gomez-olvera
05/25/2018, 7:58 AM