aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/firmament/util/IdentityCharacteristics.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/util/IdentityCharacteristics.kt')
-rw-r--r--src/main/kotlin/moe/nea/firmament/util/IdentityCharacteristics.kt17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/util/IdentityCharacteristics.kt b/src/main/kotlin/moe/nea/firmament/util/IdentityCharacteristics.kt
new file mode 100644
index 0000000..e6dad79
--- /dev/null
+++ b/src/main/kotlin/moe/nea/firmament/util/IdentityCharacteristics.kt
@@ -0,0 +1,17 @@
+/*
+ * SPDX-FileCopyrightText: 2023 Linnea Gräf <nea@nea.moe>
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+package moe.nea.firmament.util
+
+class IdentityCharacteristics<T>(val value: T) {
+ override fun equals(other: Any?): Boolean {
+ return value === other
+ }
+
+ override fun hashCode(): Int {
+ return System.identityHashCode(value)
+ }
+}