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 thisTobject. -
takeIf<
T> (bool predicate(Any)) → Any? -
Available on Any, provided by the CompanionObject extension
Returns this value if it satisfies the givenpredicateor 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 givenpredicateor 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 thisTobject.