aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils/TimeLimitedSet.kt
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-01-20 23:32:08 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-01-20 23:32:08 +0100
commit3e3ecdc6098e6137574afb925c6fd67551c5bf5c (patch)
tree1a742e8e328925cd4e2a1de468e844447adf3252 /src/main/java/at/hannibal2/skyhanni/utils/TimeLimitedSet.kt
parenta7fdf009c3012522289c73d330e442005418743d (diff)
downloadskyhanni-3e3ecdc6098e6137574afb925c6fd67551c5bf5c.tar.gz
skyhanni-3e3ecdc6098e6137574afb925c6fd67551c5bf5c.tar.bz2
skyhanni-3e3ecdc6098e6137574afb925c6fd67551c5bf5c.zip
Fixed a rare bug that leaves ghost burrows around.
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils/TimeLimitedSet.kt')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/TimeLimitedSet.kt2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/TimeLimitedSet.kt b/src/main/java/at/hannibal2/skyhanni/utils/TimeLimitedSet.kt
index 97caf70ad..e64c55213 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/TimeLimitedSet.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/TimeLimitedSet.kt
@@ -11,4 +11,6 @@ class TimeLimitedSet<T>(expireAfterWrite: Duration) {
fun contains(element: T): Boolean = cache.containsKey(element)
fun clear() = cache.clear()
+
+ fun toSet(): Set<T> = cache.keys().toSet()
}