ConsulKotlinEsqueOps<T> extension
Methods
-
also(dynamic func(T))
→ T
-
Kotlin-esque "operator" to execute
func
on this
, but returning this
.
-
let<R>(R transform(T))
→ R
-
Kotlin-esque "operator" to execute
transform
on this
. Allows ?.let(...)
instead of
if (something != null) something."transform"
in case the latter reads worse.
-
takeIf(bool condition)
→ T?
-
Kotlin-esque "operator" to take
this
if condition
is true
, or else return null
.
-
takeIf_(bool condition(T))
→ T?
-
Kotlin-esque "operator" to take
this
if condition
is true
, or else return null
.