Package org.approvej.scrub
Class DateTimeScrubber
java.lang.Object
org.approvej.scrub.RegexScrubber
org.approvej.scrub.DateTimeScrubber
Special
RegexScrubber
to scrub date/time strings described by a DateTimeFormatter
pattern like "yyyy-MM-dd" for local dates.-
Method Summary
Modifier and TypeMethodDescriptionreplacement
(String staticReplacement) Set the replacementFunction
always returning the given staticReplacement.replacement
(Replacement replacement) Set theReplacement
to be used.Makes this use arelativeDate
to replace matches of thedateTimePattern
.Methods inherited from class org.approvej.scrub.RegexScrubber
apply
-
Method Details
-
replacement
Description copied from class:RegexScrubber
Set theReplacement
to be used.- Overrides:
replacement
in classRegexScrubber
- Parameters:
replacement
- aReplacement
function- Returns:
- this
-
replacement
Description copied from class:RegexScrubber
Set the replacementFunction
always returning the given staticReplacement.- Overrides:
replacement
in classRegexScrubber
- Parameters:
staticReplacement
- the static replacementString
- Returns:
- this
-
replaceWithRelativeDate
Makes this use arelativeDate
to replace matches of thedateTimePattern
.- Returns:
- this
-