filter

fun <T> Maybe<T>.filter(predicate: (T) -> Boolean): Maybe<T>

Filters the value emitted by the Maybe using the provided predicate. The returned Maybe signals onSuccess if the predicate returned true, otherwise signals onComplete.

Please refer to the corresponding RxJava document.