Package org.approvej.scrub
Interface Replacement
- All Superinterfaces:
BiFunction<String,
Integer, String>
- All Known Implementing Classes:
RelativeDateReplacement
A
BiFunction
, that defines how a match in the RegexScrubber
is replaced.-
Method Summary
Methods inherited from interface java.util.function.BiFunction
andThen
-
Method Details
-
apply
Will return a replacement for the given match and count.The count will be the same for equal matches. E.g. if all vowels (
[aeiou]
) should be replaced in the textHello there
, this will be applied four times:He
apply("e", 1)
,Hello
apply("o", 2)
,Hello the
apply("e", 1)
,Hello there
apply("e", 1)
- Specified by:
apply
in interfaceBiFunction<String,
Integer, String> - Parameters:
match
- the found string that will be replacedcount
- the number of the distinct match- Returns:
- the replacement
-