-
public final class ExtrasExtensionsKt
-
-
Method Summary
Modifier and Type Method Description final static <T extends Any> TgetExtraOr(Extras $self, Object key, Function0<T> block)Returns the value of the extra with the given key if such an extra exists. final static <T extends Any> TgetOrPutExtra(Extras $self, Object key, Function0<T> block)Returns the value of the extra with the given key if such an extra exists. -
-
Method Detail
-
getExtraOr
final static <T extends Any> T getExtraOr(Extras $self, Object key, Function0<T> block)
Returns the value of the extra with the given key if such an extra exists. Otherwise, returns the result of block.
-
getOrPutExtra
final static <T extends Any> T getOrPutExtra(Extras $self, Object key, Function0<T> block)
Returns the value of the extra with the given key if such an extra exists. Otherwise, returns the result of block and saves it as an extra with the given key.
-
-
-
-