Package org.approvej.scrub
Class Scrubbers
java.lang.Object
org.approvej.scrub.Scrubbers
Collection of static methods to create
Scrubber
instances.-
Method Summary
Modifier and TypeMethodDescriptionstatic RegexScrubber
dates
(DateTimeFormatter dateFormatPattern) CreatesRegexScrubber
to replace date strings of the given pattern.static RegexScrubber
instants
(DateTimeFormatter dateFormatPattern) RegexScrubber
that replaces instant strings of the given pattern.static RelativeDateScrubber
relativeDates
(DateTimeFormatter dateFormatPattern) Creates aScrubber
to replace date strings of the given pattern.static RegexScrubber
stringsMatching
(String pattern) Creates aRegexScrubber
with the given pattern.static RegexScrubber
stringsMatching
(Pattern pattern) Creates aRegexScrubber
with the given pattern.static RegexScrubber
uuids()
RegexScrubber
for UUIDs.
-
Method Details
-
stringsMatching
Creates aRegexScrubber
with the given pattern.- Parameters:
pattern
- thePattern
matching the strings to be scrubbed- Returns:
- a
RegexScrubber
with the given pattern
-
stringsMatching
Creates aRegexScrubber
with the given pattern.- Parameters:
pattern
- the pattern matching the string to be scrubbed asString
- Returns:
- a
RegexScrubber
with the given pattern - See Also:
-
dates
CreatesRegexScrubber
to replace date strings of the given pattern.- Parameters:
dateFormatPattern
- aDateTimeFormatter
to parse the dates- Returns:
- a new
RegexScrubber
with the givenDateTimeFormatter
turned into aPattern
-
instants
RegexScrubber
that replaces instant strings of the given pattern.- Parameters:
dateFormatPattern
- aDateTimeFormatter
to parse the dates- Returns:
- a new
RegexScrubber
with the givenDateTimeFormatter
turned into aPattern
-
uuids
RegexScrubber
for UUIDs.- Returns:
- a
RegexScrubber
that replaces all UUIDs
-
relativeDates
Creates aScrubber
to replace date strings of the given pattern.- Parameters:
dateFormatPattern
- aDateTimeFormatter
to parse the dates- Returns:
- a new
RelativeDateScrubber
with the givenDateTimeFormatter
.
-