diff --git a/musikr/src/main/java/org/oxycblt/musikr/tag/Name.kt b/musikr/src/main/java/org/oxycblt/musikr/tag/Name.kt index a0ac67fda..8d16ebffc 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/tag/Name.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/tag/Name.kt @@ -67,9 +67,12 @@ sealed interface Name : Comparable { } /** An individual part of a name string that can be compared intelligently. */ -data class Token +class Token internal constructor(internal val collationKey: CollationKey, internal val type: Type) : Comparable { + override fun equals(other: Any?) = + other is Token && collationKey == other.collationKey && type == other.type + override fun hashCode() = 31 * collationKey.hashCode() + type.hashCode() val value: String get() = collationKey.sourceString