toggle menu
Simple Robot
4.8.0
common
switch theme
search in API
simbot-common-core
/
love.forte.simbot.common.attribute
/
MutableAttributeMap
/
computeIfPresent
compute
If
Present
abstract
fun
<
T
:
Any
>
computeIfPresent
(
attribute
:
Attribute
<
T
>
,
remappingFunction
:
(
Attribute
<
T
>
,
T
)
->
T
?
)
:
T
?
(
source
)
如果存在,则计算。如果计算函数中返回null,则为移除对应结果。
Throws
Class
Cast
Exception
如果类型不匹配