EnsureNotNullEitherEffectExtension<L> extension

Provide ensureNotNull extension on EitherEffect.

on

Methods

ensureNotNull<R extends Object>(R? value, L orLeft()) → R
Ensures that value is not null. When the value is not null, then it will be returned as non null and the check value is now smart-checked to non-null. Otherwise, if the value is null then the Either.binding(...) will short-circuit with orLeft inside of Left.