diff options
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/IdentityCharacteristics.kt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/IdentityCharacteristics.kt b/src/main/java/at/hannibal2/skyhanni/utils/IdentityCharacteristics.kt new file mode 100644 index 000000000..5b1399f73 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/utils/IdentityCharacteristics.kt @@ -0,0 +1,12 @@ +package at.hannibal2.skyhanni.utils + +class IdentityCharacteristics<T>(val value: T) { + override fun equals(other: Any?): Boolean { + if (other !is IdentityCharacteristics<*>) return false + return this.value === other.value + } + + override fun hashCode(): Int { + return System.identityHashCode(value) + } +} |