Package net.kyori.adventure.text
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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull PatternReplacementResult
shouldReplace(@NotNull java.util.regex.MatchResult result, int matchCount, int replaced)
Determine how a single match should be handled.
-
-
-
Method Detail
-
shouldReplace
@NotNull @NotNull PatternReplacementResult shouldReplace(@NotNull @NotNull java.util.regex.MatchResult result, int matchCount, int replaced)
Determine how a single match should be handled.- Parameters:
result
- the current match resultmatchCount
- the number of matches encountered, including this one and matches that were not replacedreplaced
- the number of matches that have already been replaced- Returns:
- whether a certain match should
- Since:
- 4.8.0
-
-