ObjectX<T> extension
An extension that adds utilities for safely casting objects
Methods
-
guard<R>(R cb(T value))
→ R?
-
Available on T?,
provided by the ObjectX extension
Transform an object if that value is not null.
-
safeCast<R>()
→ R?
-
Available on T?,
provided by the ObjectX extension
Safely cast an object, returning null
if the casted object does not
match the casted type.