Shorten the EventSnowy.Companion.useKey() method
This commit is contained in:
parent
bd9b4eab67
commit
3b6cd7a385
|
@ -8,7 +8,7 @@ interface EventSnowy {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
companion object {
|
companion object {
|
||||||
fun useKey(key: String): MutableSet<argsLambda> { return eventMap.getOrPut(key, ::mutableSetOf) }
|
fun useKey(key: String): MutableSet<argsLambda> = eventMap.getOrPut(key, ::mutableSetOf)
|
||||||
private val eventMap: MutableMap<String, MutableSet<argsLambda>> = mutableMapOf()
|
private val eventMap: MutableMap<String, MutableSet<argsLambda>> = mutableMapOf()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue