ObjectExt<T extends Object> extension
Extension for Objects.
- on
-
- T
Methods
-
apply<
R> (R f(T self)) → R -
Available on T, provided by the ObjectExt extension
Appliesf
to this object and returns the result. -
when(
bool predicate(T self), {T? orElse(T self)?}) → T? -
Available on T, provided by the ObjectExt extension
Returns the result oforElse
ifpredicate
returns false, otherwise returns this. -
when2(
bool predicate(T self)) → _When< T> -
Available on T, provided by the ObjectExt extension
Returns an instance of_When
that allows further processing. -
whenn(
bool predicate(T self)) → T? -
Available on T, provided by the ObjectExt extension
Special case when "there is no else", avoiding the curried invocation.