aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils/TimeLimitedSet.kt
diff options
context:
space:
mode:
authorEmpa <42304516+ItsEmpa@users.noreply.github.com>2024-05-24 14:36:56 +0200
committerGitHub <noreply@github.com>2024-05-24 14:36:56 +0200
commitfe0449b9b8161135874ac99c1685233349f06f0d (patch)
treec14bd993d1dab1cc771b13fa4cb99c7a7f3a1864 /src/main/java/at/hannibal2/skyhanni/utils/TimeLimitedSet.kt
parentcb6869cb79cb4f5679eb90f9120c716b77a9078e (diff)
downloadskyhanni-fe0449b9b8161135874ac99c1685233349f06f0d.tar.gz
skyhanni-fe0449b9b8161135874ac99c1685233349f06f0d.tar.bz2
skyhanni-fe0449b9b8161135874ac99c1685233349f06f0d.zip
Backend: GetOrPut in TimeLimitedCache (#1875)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
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, 1 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/TimeLimitedSet.kt b/src/main/java/at/hannibal2/skyhanni/utils/TimeLimitedSet.kt
index 5f0ccd404..fae86fac5 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/TimeLimitedSet.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/TimeLimitedSet.kt
@@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.utils
import kotlin.time.Duration
-class TimeLimitedSet<T>(
+class TimeLimitedSet<T: Any>(
expireAfterWrite: Duration,
private val removalListener: (T) -> Unit = {},
) {