ObjectExtension<T extends Object> extension

An extension for any non-null values.

on
  • T

Methods

as_<U>() → U
This method works the same as as keyword.
asIf<U>() → U?
Casts to U type and returns the value if possible, otherwise return null.
is_<U>() bool
This method works the same as is keyword.
let<R>(R func(T value)) → R
Calls given function when current value is not null.