ifPresent method

  1. @override
Maybe<T> ifPresent(
  1. void consumer(
    1. T value
    )
)
override

Calls the consumer if the wrapped value is present.

Implementation

@override
Maybe<T> ifPresent(void Function(T value) consumer) {
  consumer(value);
  return this;
}