Interface TextReplacementConfig.Condition

  • Enclosing interface:
    TextReplacementConfig
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public static interface TextReplacementConfig.Condition
    A function determining whether a certain match should be replaced.
    Since:
    4.8.0
    • Method Detail

      • shouldReplace

        @NotNull
        @NotNull PatternReplacementResult shouldReplace​(@NotNull
                                                        @NotNull MatchResult result,
                                                        int matchCount,
                                                        int replaced)
        Determine how a single match should be handled.
        Parameters:
        result - the current match result
        matchCount - the number of matches encountered, including this one and matches that were not replaced
        replaced - the number of matches that have already been replaced
        Returns:
        whether a certain match should
        Since:
        4.8.0