mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup [syntax]: simplify web implementations
GitOrigin-RevId: 32733fe2605ecc087032ad9997e1af244ddd0916
This commit is contained in:
committed by
intellij-monorepo-bot
parent
71e211afd9
commit
b76de2a604
+2
-6
@@ -21,14 +21,10 @@ private class SyntaxConcurrentMapJs<K : Any, V : Any>() : MultiplatformConcurren
|
||||
override val keys: Set<K>
|
||||
get() = map.keys
|
||||
|
||||
override fun computeIfAbsent(key: K, f: (K) -> V): V = map[key] ?: f(key).also { map[key] = it }
|
||||
override fun computeIfAbsent(key: K, f: (K) -> V): V = map.getOrPut(key) { f(key) }
|
||||
override fun get(key: K): V? = map[key]
|
||||
override fun remove(key: K): V? = map.remove(key)
|
||||
override fun put(key: K, value: V): V? {
|
||||
val prevValue = map[key]
|
||||
map[key] = value
|
||||
return prevValue
|
||||
}
|
||||
override fun put(key: K, value: V): V? = map.put(key, value)
|
||||
override fun hashCode(): Int = map.hashCode()
|
||||
override fun toString(): String = map.toString()
|
||||
override fun equals(other: Any?): Boolean {
|
||||
|
||||
+2
-6
@@ -21,14 +21,10 @@ private class SyntaxConcurrentMapWasmJs<K : Any, V : Any>() : MultiplatformConcu
|
||||
override val keys: Set<K>
|
||||
get() = map.keys
|
||||
|
||||
override fun computeIfAbsent(key: K, f: (K) -> V): V = map[key] ?: f(key).also { map[key] = it }
|
||||
override fun computeIfAbsent(key: K, f: (K) -> V): V = map.getOrPut(key) { f(key) }
|
||||
override fun get(key: K): V? = map[key]
|
||||
override fun remove(key: K): V? = map.remove(key)
|
||||
override fun put(key: K, value: V): V? {
|
||||
val prevValue = map[key]
|
||||
map[key] = value
|
||||
return prevValue
|
||||
}
|
||||
override fun put(key: K, value: V): V? = map.put(key, value)
|
||||
override fun hashCode(): Int = map.hashCode()
|
||||
override fun toString(): String = map.toString()
|
||||
override fun equals(other: Any?): Boolean {
|
||||
|
||||
Reference in New Issue
Block a user