withResult

public final static FilterResult<TNew> withResult<TOld extends Any, TNew extends Any>(FilterResult<TOld> $self, TNew result)(source)

If the current FilterResult is FilterResult.Match, change its result to the given one. Otherwise, return the original.

Parameters

TOld

The type of the old result

TNew

The type of the new result

result

The new result