@Contract("_ -> this")
    default @NotNull Builder condition(final @NotNull IntFunction2<PatternReplacementResult> condition) {
      return this.condition((result, matchCount, replaced) -> condition.apply(matchCount, replaced));
    }
Set the function to determine how an individual match should be processed.

@param condition a function of {@code (matchCount, replaced)} used to determine if matches should be replaced, where "matchCount" is the number of matches
                 that have been found, including the current one, and "replaced" is the number of successful replacements.
@return this builder
@since 4.2.0
api/src/main/java/net/kyori/adventure/text/TextReplacementConfig.java