Interface Scrubber<I extends Scrubber<I,T,R>,T,R>

Type Parameters:
I - the type of the scrubber itself
T - the type of value to scrub
R - the type of the replacement
All Superinterfaces:
Function<T,T>, UnaryOperator<T>
All Known Subinterfaces:
DateTimeScrubber, FieldScrubber<T>, StringScrubber

public interface Scrubber<I extends Scrubber<I,T,R>,T,R> extends UnaryOperator<T>
An UnaryOperator that scrubs certain information from a value. This might be useful especially for dynamic data like timestamps, dates or generally random values.
  • Method Summary

    Modifier and Type
    Method
    Description
    replacement(Replacement<R> replacement)
    Creates a copy of this using the given Replacement.
    default I
    replacement(R staticReplacement)
    Creates a copy of this using the given staticReplacement.

    Methods inherited from interface java.util.function.Function

    andThen, apply, compose
  • Method Details

    • replacement

      I replacement(Replacement<R> replacement)
      Creates a copy of this using the given Replacement.
      Parameters:
      replacement - a Replacement function
      Returns:
      a copy of this using the given Replacement
    • replacement

      default I replacement(R staticReplacement)
      Creates a copy of this using the given staticReplacement.
      Parameters:
      staticReplacement - a static value that will replace any match of the scrubber
      Returns:
      a copy of this using the given staticReplacement