aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/com/dulkirfabric/config/Pair.kt
diff options
context:
space:
mode:
authoringlettronald <inglettronald@gmail.com>2023-06-08 19:54:16 -0500
committeringlettronald <inglettronald@gmail.com>2023-06-08 19:54:16 -0500
commitb9ebcac2b791c448da6aa1ecf03ebfe0530428b3 (patch)
treef1095b2b2588e7d91463ad9fbc83cd72ac77c1dd /src/main/kotlin/com/dulkirfabric/config/Pair.kt
parent67b628b44bd6f35e0a71824014a8c1b92742eac9 (diff)
downloadDulkirMod-Fabric-b9ebcac2b791c448da6aa1ecf03ebfe0530428b3.tar.gz
DulkirMod-Fabric-b9ebcac2b791c448da6aa1ecf03ebfe0530428b3.tar.bz2
DulkirMod-Fabric-b9ebcac2b791c448da6aa1ecf03ebfe0530428b3.zip
More complete Config Implementation work
Diffstat (limited to 'src/main/kotlin/com/dulkirfabric/config/Pair.kt')
-rw-r--r--src/main/kotlin/com/dulkirfabric/config/Pair.kt28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/main/kotlin/com/dulkirfabric/config/Pair.kt b/src/main/kotlin/com/dulkirfabric/config/Pair.kt
new file mode 100644
index 0000000..cf5e914
--- /dev/null
+++ b/src/main/kotlin/com/dulkirfabric/config/Pair.kt
@@ -0,0 +1,28 @@
+package com.dulkirfabric.config
+
+class Pair<T, R>(val t: T, val r: R) {
+
+ fun getLeft(): T {
+ return t
+ }
+
+ fun getRight(): R {
+ return r
+ }
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ } else if (other != null && this::class == other::class) {
+ other as Pair<*, *>
+ return t == other.t && r == other.r
+ }
+ return false
+ }
+
+ override fun hashCode(): Int {
+ var result = t?.hashCode() ?: 0
+ result = 31 * result + (r?.hashCode() ?: 0)
+ return result
+ }
+}