Combine Configurations

Users want to be able to combine different configurations to a new configuration instance. Hereby the resulting configuration can be

  • a union of both, ignoring duplicates (and optionally log them)

  • a union of both, duplicates are ignored

  • a union of both, conflicts are thrown as ConfigException

  • an intersection of both, containing only keys present and equal in both configurations

  • an arbitrary mapping or filter, modelled by an CombinationPolicy, which basically can be modelled as BiFunction<String, String, String>, hereby

    • a result of null will remove the key

    • any other result will use the value returned as final value of the combination.