You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
694 B
Kotlin

package me.eater.hefbrug.definition
import me.eater.hefbrug.logging.LogFormat
open class DefinitionKey(val group: String, val id: String) : LogFormat {
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (javaClass != other?.javaClass) return false
other as DefinitionKey
if (group != other.group) return false
if (id != other.id) return false
return true
}
override fun hashCode(): Int {
var result = group.hashCode()
result = 31 * result + id.hashCode()
return result
}
override fun toString(): String = "$group.$id"
override fun logFormat() = "@|blue $this|@"
}