aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils/IdentityCharacteristics.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils/IdentityCharacteristics.kt')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/IdentityCharacteristics.kt12
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)
+ }
+}