Eivind
08/20/2024, 12:38 PMoverride fun equals(other: Any?): Boolean {
if (other == null || other !is ContentID) return false
return byeArray.contentEquals(other.contentID)
}
override fun hashCode(): Int {
return byeArray.contentHashCode()
}
Adam S
08/20/2024, 1:46 PMEivind
08/20/2024, 1:55 PMKlitos Kyriacou
08/20/2024, 2:50 PMif (other == null || other !is ContentID) return false
can be shortened to if (other !is ContentID) return false
Klitos Kyriacou
08/20/2024, 2:51 PMreturn byeArray.contentEquals(other.byeArray)
instead of other.contentID
?Eivind
08/20/2024, 9:16 PM