Class OverrideConfigFilter

All Implemented Interfaces:

public class OverrideConfigFilter extends Object implements ConfigFilter
A config filter that replaces values with a new ones of keys that matching with Pattern.
  • Constructor Details

    • OverrideConfigFilter

      public OverrideConfigFilter(Supplier<List<Map.Entry<Predicate<Config.Key>,String>>> overrideValuesSupplier)
      Creates a filter with a given supplier of a map of key patterns to a override values.
      overrideValuesSupplier - a supplier of a map of key patterns to a override values
  • Method Details

    • apply

      public String apply(Config.Key key, String stringValue)
      Description copied from interface: ConfigFilter
      Filters an elementary config value before it is made available to the application via the Config API.
      Specified by:
      apply in interface ConfigFilter
      key - configuration key associated with the Config node
      stringValue - original value to be filtered, never null
      original value or filtered (changed) value, never null