diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-01-20 23:32:08 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-01-20 23:32:08 +0100 |
commit | 3e3ecdc6098e6137574afb925c6fd67551c5bf5c (patch) | |
tree | 1a742e8e328925cd4e2a1de468e844447adf3252 /src/main/java/at/hannibal2/skyhanni/utils/TimeLimitedSet.kt | |
parent | a7fdf009c3012522289c73d330e442005418743d (diff) | |
download | skyhanni-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.kt | 2 |
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() } |