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 RegexScrubberdates(DateTimeFormatter dateFormatPattern) CreatesRegexScrubberto replace date strings of the given pattern.static RegexScrubberinstants(DateTimeFormatter dateFormatPattern) RegexScrubberthat replaces instant strings of the given pattern.static RelativeDateScrubberrelativeDates(DateTimeFormatter dateFormatPattern) Creates aScrubberto replace date strings of the given pattern.static RegexScrubberstringsMatching(String pattern) Creates aRegexScrubberwith the given pattern.static RegexScrubberstringsMatching(Pattern pattern) Creates aRegexScrubberwith the given pattern.static RegexScrubberuuids()RegexScrubberfor UUIDs.
-
Method Details
-
stringsMatching
Creates aRegexScrubberwith the given pattern.- Parameters:
pattern- thePatternmatching the strings to be scrubbed- Returns:
- a
RegexScrubberwith the given pattern
-
stringsMatching
Creates aRegexScrubberwith the given pattern.- Parameters:
pattern- the pattern matching the string to be scrubbed asString- Returns:
- a
RegexScrubberwith the given pattern - See Also:
-
dates
CreatesRegexScrubberto replace date strings of the given pattern.- Parameters:
dateFormatPattern- aDateTimeFormatterto parse the dates- Returns:
- a new
RegexScrubberwith the givenDateTimeFormatterturned into aPattern
-
instants
RegexScrubberthat replaces instant strings of the given pattern.- Parameters:
dateFormatPattern- aDateTimeFormatterto parse the dates- Returns:
- a new
RegexScrubberwith the givenDateTimeFormatterturned into aPattern
-
uuids
RegexScrubberfor UUIDs.- Returns:
- a
RegexScrubberthat replaces all UUIDs
-
relativeDates
Creates aScrubberto replace date strings of the given pattern.- Parameters:
dateFormatPattern- aDateTimeFormatterto parse the dates- Returns:
- a new
RelativeDateScrubberwith the givenDateTimeFormatter.
-