HigherOrderFunctions<T> extension
- on
-
- T?
Methods
-
flatMap<
U> (U? f(T)) → U? -
Available on T?, provided by the HigherOrderFunctions extension
Applies a transformationf
that may return null to the value if it is notnull
. -
inspect(
void f(T)) → T? -
Available on T?, provided by the HigherOrderFunctions extension
Calls the provided closure with a reference to the value if it is notnull
and returns the value. -
map<
U> (U f(T)) → U? -
Available on T?, provided by the HigherOrderFunctions extension
Applies a transformationf
to the value if it is notnull
. -
mapIf<
U> (bool p(T), U f(T)) → U? -
Available on T?, provided by the HigherOrderFunctions extension
Maps over the value if it is not null and satisfies the given predicate. -
or(
T alt) → T -
Available on T?, provided by the HigherOrderFunctions extension
Returns the value if it's not anull
, otherwise returns the alternativealt
. -
orElse(
T f()) → T -
Available on T?, provided by the HigherOrderFunctions extension
Returns the value if it's not anull
, otherwise callsf
and returns the result.