From b9ebcac2b791c448da6aa1ecf03ebfe0530428b3 Mon Sep 17 00:00:00 2001 From: inglettronald Date: Thu, 8 Jun 2023 19:54:16 -0500 Subject: More complete Config Implementation work --- .../kotlin/com/dulkirfabric/config/DulkirConfig.kt | 2 +- src/main/kotlin/com/dulkirfabric/config/Pair.kt | 28 ++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 src/main/kotlin/com/dulkirfabric/config/Pair.kt (limited to 'src/main') diff --git a/src/main/kotlin/com/dulkirfabric/config/DulkirConfig.kt b/src/main/kotlin/com/dulkirfabric/config/DulkirConfig.kt index cc36306..2855a17 100644 --- a/src/main/kotlin/com/dulkirfabric/config/DulkirConfig.kt +++ b/src/main/kotlin/com/dulkirfabric/config/DulkirConfig.kt @@ -76,7 +76,7 @@ class DulkirConfig { val deleteButtonEnabled = true val insertInFront = true //val createNewCell: BiFunction, NestedListListEntry, INNER>, INNER>> - + //TODO builder.transparentBackground() screen = builder.build() 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(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 + } +} -- cgit