diff options
author | Thunderblade73 <85900443+Thunderblade73@users.noreply.github.com> | 2024-04-30 18:16:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-30 18:16:05 +0200 |
commit | 249e02778ce9543afc515ee4c7b5a57e154ac61d (patch) | |
tree | 44412cbbf98c5aa370e50e6599861ff556b73c50 /src/main/java/at/hannibal2/skyhanni/utils/CollectionUtils.kt | |
parent | 7f26ff46f3a537f1561b33d9bb513a81509f855b (diff) | |
download | skyhanni-249e02778ce9543afc515ee4c7b5a57e154ac61d.tar.gz skyhanni-249e02778ce9543afc515ee4c7b5a57e154ac61d.tar.bz2 skyhanni-249e02778ce9543afc515ee4c7b5a57e154ac61d.zip |
Backend: Renderable scrollables (#886)
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils/CollectionUtils.kt')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/CollectionUtils.kt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/CollectionUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/CollectionUtils.kt index f538f2d53..df4f15e47 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/CollectionUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/CollectionUtils.kt @@ -148,6 +148,9 @@ object CollectionUtils { return this } + operator fun IntRange.contains(range: IntRange): Boolean = + range.first in this && range.last in this + fun <E> MutableList<List<E>>.addAsSingletonList(text: E) { add(Collections.singletonList(text)) } |