package com.statemachinesystems.envy.sources;

import com.statemachinesystems.envy.ConfigSource;
import com.statemachinesystems.envy.Parameter;

/**
 * A composite {@link com.statemachinesystems.envy.ConfigSource} implementation
 * that retrieves configuration values from its component sources in preference order.
 */
public class DelegatingConfigSource implements ConfigSource {

    private final ConfigSource[] sources;

    public DelegatingConfigSource(ConfigSource... sources) {
        this.sources = sources;
    }

    @Override
    public String getValue(Parameter parameter) {
        for (ConfigSource source : sources) {
            String value = source.getValue(parameter);
            if (value != null) {
                return value;
            }
        }
        return null;
    }
}

@@ -419,16 +419,290 @@
 urces;%0A%0A
+    /**%0A     * Creates a %7B@link com.statemachinesystems.envy.sources.DelegatingConfigSource%7D using%0A     * the given component sources in preference order.%0A     *%0A     * @param sources  component %7B@link com.statemachinesystems.envy.ConfigSource%7Ds in preference order%0A     */%0A
     publ

Add Javadoc for DelegatingConfigSource constructor