toggle menu
Simple Robot
4.8.0
common
switch theme
search in API
simbot-common-core
/
love.forte.simbot.common.attribute
/
MutableAttributeMap
/
safeComputeIfAbsent
safe
Compute
If
Absent
abstract
fun
<
T
:
Any
>
safeComputeIfAbsent
(
attribute
:
Attribute
<
T
>
,
mappingFunction
:
(
Attribute
<
T
>
)
->
T
)
:
Any
(
source
)
如果不存在,则计算并存入,且不对返回值进行类型转化。