Interface ValueMasker

All Known Subinterfaces:
ValueMasker.AnyValueMasker, ValueMasker.BooleanMasker, ValueMasker.NumberMasker, ValueMasker.StringMasker

A functional interface which enables masking JSON values (boolean, numbers, and strings) in almost every imaginable way. Accepts ValueMaskerContext that contains the context of the current value being masked.

This is a sealed interface in order to make sure that correct JSON type is only masked with the implementation that supports masking of that particular type of the value. There's also a special ValueMasker.AnyValueMasker that can mask values of any JSON type.

Most of the out-of-the-box implementation are, in fact, instances of ValueMasker.AnyValueMasker, but some concrete implementations can only mask values of the specific type: For strings it's ValueMaskers.email(int, int, boolean, String) and ValueMaskers.eachCharacterWith(String), for numbers ValueMaskers.eachDigitWith(int).

See Also:
  • Method Details