public final Mono<T> filterWhen(Function<? super T, ? extends Publisher<Boolean>> asyncPredicate) {
    """
	If this {@link Mono} is valued, test the value asynchronously using a generated
	{@code Publisher<Boolean>} test. The value from the Mono is replayed if the
	first item emitted by the test is {@literal true}. It is dropped if the test is
	either empty or its first emitted value is {@literal false}.
	<p>
	Note that only the first value of the test publisher is considered, and unless it
	is a {@link Mono}, test will be cancelled after receiving that first value.
	
	<p>
	<img class="marble" src="doc-files/marbles/filterWhenForMono.svg" alt="">
	
	@reactor.discard This operator discards the element if it does not match the filter. It
	also discards upon cancellation or error triggered by a data signal.
	
	@param asyncPredicate the function generating a {@link Publisher} of {@link Boolean}
	to filter the Mono with
	@return a filtered {@link Mono}
    """
		return onAssembly(new MonoFilterWhen<>(this, asyncPredicate));
	}
public final Mono<T> filterWhen(Function<? super T, ? extends Publisher<Boolean>> asyncPredicate) {
		return onAssembly(new MonoFilterWhen<>(this, asyncPredicate));
	}
public final Mono < T > filterWhen ( Function < ? super T , ? extends Publisher < Boolean > > asyncPredicate ) { return onAssembly ( new MonoFilterWhen <> ( this , asyncPredicate ) ) ; }
If this {@link Mono} is valued, test the value asynchronously using a generated
{@code Publisher<Boolean>} test. The value from the Mono is replayed if the
first item emitted by the test is {@literal true}. It is dropped if the test is
either empty or its first emitted value is {@literal false}.
<p>
Note that only the first value of the test publisher is considered, and unless it
is a {@link Mono}, test will be cancelled after receiving that first value.

<p>
<img class="marble" src="doc-files/marbles/filterWhenForMono.svg" alt="">

@reactor.discard This operator discards the element if it does not match the filter. It
also discards upon cancellation or error triggered by a data signal.

@param asyncPredicate the function generating a {@link Publisher} of {@link Boolean}
to filter the Mono with
@return a filtered {@link Mono}
If this { @link Mono } is valued test the value asynchronously using a generated { @code Publisher<Boolean > } test . The value from the Mono is replayed if the first item emitted by the test is { @literal true } . It is dropped if the test is either empty or its first emitted value is { @literal false } . <p > Note that only the first value of the test publisher is considered and unless it is a { @link Mono } test will be cancelled after receiving that first value .