Package hiiragi283.core.api.property
Class HTPropertyMapsKt
-
- All Implemented Interfaces:
public final class HTPropertyMapsKt
-
-
Method Summary
Modifier and Type Method Description final static <T extends Any> TgetOrThrow(HTPropertyMap $self, HTPropertyKey<T> key)指定したkeyに紐づいた値を返します。 final static <T extends Any> TgetOrDefault(HTPropertyMap $self, HTPropertyKey<T> key)指定したkeyに紐づいた値を返します。 final static Unitadd(HTPropertyMap.Mutable $self, HTPropertyKey<Unit> key)final static UnitplusAssign(HTPropertyMap.Mutable $self, HTPropertyKey<Unit> key)final static <T extends Any> TcomputeIfAbsent(HTPropertyMap.Mutable $self, HTPropertyKey<T> key, Function0<T> mapping)final static <T extends Any> TcomputeIfAbsent(HTPropertyMap.Mutable $self, HTPropertyKey<T> key, Function1<T, T> mapping)-
-
Method Detail
-
getOrThrow
final static <T extends Any> T getOrThrow(HTPropertyMap $self, HTPropertyKey<T> key)
指定したkeyに紐づいた値を返します。
-
getOrDefault
final static <T extends Any> T getOrDefault(HTPropertyMap $self, HTPropertyKey<T> key)
指定したkeyに紐づいた値を返します。
- Returns:
値がない場合はデフォルト値
-
add
final static Unit add(HTPropertyMap.Mutable $self, HTPropertyKey<Unit> key)
- Since:
0.9.0
-
plusAssign
final static Unit plusAssign(HTPropertyMap.Mutable $self, HTPropertyKey<Unit> key)
- Since:
0.9.0
-
computeIfAbsent
final static <T extends Any> T computeIfAbsent(HTPropertyMap.Mutable $self, HTPropertyKey<T> key, Function0<T> mapping)
-
computeIfAbsent
final static <T extends Any> T computeIfAbsent(HTPropertyMap.Mutable $self, HTPropertyKey<T> key, Function1<T, T> mapping)
-
-
-
-