Maybe<A extends Object> extension

on
  • A?

Methods

ifNull(A f()) → A
Returns result of f if this is null, else returns this.
maybeFlatMap<B extends Object>(Func1<A, B?> f) → B?
maybeMap<B extends Object>(Func1<A, B> f) → B?
maybeWhere(Predicate<A> f) → A?
Filters value based on predicate f and returns either value itself or null.
maybeWhereType<B>() → B?
Filters value based on type B and returns either value itself or null.