mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-10 18:40:15 +08:00
Add hashCode and equals to AnsiMessageBuilder
This commit is contained in:
parent
b87a5390b9
commit
7fad444a0c
@ -114,6 +114,14 @@ public open class AnsiMessageBuilder public constructor(
|
||||
}
|
||||
|
||||
override fun compareTo(other: AnsiMessageBuilder): Int = this.delegate.compareTo(other.delegate)
|
||||
override fun hashCode(): Int = this.delegate.hashCode()
|
||||
override fun equals(other: Any?): Boolean {
|
||||
if (other == null) return false
|
||||
if (other::class.java != this::class.java) return false
|
||||
other as AnsiMessageBuilder
|
||||
if (other.delegate != this.delegate) return false
|
||||
return true
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
override fun append(c: Char): AnsiMessageBuilder = apply { delegate.append(c) }
|
||||
|
Loading…
Reference in New Issue
Block a user