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 RegexScrubberdateTimeFormat(String dateTimePattern) CreatesDateTimeScrubberto replace date/time strings of the given pattern localized by the defaultLocale.static RegexScrubberdateTimeFormat(String dateTimePattern, Locale locale) CreatesDateTimeScrubberto replace date/time strings of the given pattern localized by the given locale.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:
-
dateTimeFormat
CreatesDateTimeScrubberto replace date/time strings of the given pattern localized by the given locale.- Parameters:
dateTimePattern- a pattern as defined byDateTimeFormatterlocale- theLocaleto localize the date/time pattern (influences names of months or weekdays for example)- Returns:
- a
DateTimeScrubberfor the given date/time pattern - See Also:
-
dateTimeFormat
CreatesDateTimeScrubberto replace date/time strings of the given pattern localized by the defaultLocale.- Parameters:
dateTimePattern- a pattern as defined byDateTimeFormatter- Returns:
- a
DateTimeScrubberfor the given date/time pattern - See Also:
-
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.
-