filter abstract method

Optional<T> filter(
  1. bool predicate(
    1. T
    )
)

Returns an Optional with this Optional's value, if there is a value present and it matches the predicate. Otherwise, returns an empty Optional.

Implementation

Optional<T> filter(bool Function(T) predicate);