CompanionObject extension

on

Methods

asDynamic() → dynamic

Available on Any, provided by the CompanionObject extension

safeCast<T>() → T?

Available on Any, provided by the CompanionObject extension

Casts the given value to the class represented by this T object.
takeIf<T>(bool predicate(Any)) Any?

Available on Any, provided by the CompanionObject extension

Returns this value if it satisfies the given predicate or null, if it doesn't.
takeUnless<T>(bool predicate(Any)) Any?

Available on Any, provided by the CompanionObject extension

Returns this value if it does not satisfies the given predicate or null, if it doesn't.
to(Any that) → (Any, Any)

Available on Any, provided by the CompanionObject extension

unsafeCast<T>() → T

Available on Any, provided by the CompanionObject extension

Casts the given value to the class represented by this T object.