// Path: src/main/java/org/biiig/foodbroker/model/MasterDataObject.java
// public interface MasterDataObject extends DataObject{
//     String getQuality();
// }


import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.PropertiesConfiguration;
import org.biiig.foodbroker.model.MasterDataObject;
import java.math.BigDecimal;
import java.util.List;
package org.biiig.foodbroker.configuration;



/**
 * Created by peet on 21.11.14.
 */
public class DecimalVariationConfiguration {
    private float baseValue;
    private float influence;
    private boolean higherIsBetter;

    public DecimalVariationConfiguration(String parameter){
        try {
            PropertiesConfiguration config = new PropertiesConfiguration("config.properties");
            baseValue = config.getFloat(parameter + "Base");
            influence = config.getFloat(parameter +"Influence");
            higherIsBetter = config.getBoolean(parameter + "HigherIsBetter");
        } catch (ConfigurationException e) {
            e.printStackTrace();
        }
    }

    public BigDecimal getValue(List<MasterDataObject> influencingMasterDataObjects){
        float value = baseValue;

// Path: src/main/java/org/biiig/foodbroker/model/MasterDataObject.java
// public interface MasterDataObject extends DataObject{
//     String getQuality();
// }


// Path: src/main/java/org/biiig/foodbroker/configuration/DecimalVariationConfiguration.java
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.PropertiesConfiguration;
import org.biiig.foodbroker.model.MasterDataObject;
import java.math.BigDecimal;
import java.util.List;

package org.biiig.foodbroker.configuration;



/**
 * Created by peet on 21.11.14.
 */
public class DecimalVariationConfiguration {
    private float baseValue;
    private float influence;
    private boolean higherIsBetter;

    public DecimalVariationConfiguration(String parameter){
        try {
            PropertiesConfiguration config = new PropertiesConfiguration("config.properties");
            baseValue = config.getFloat(parameter + "Base");
            influence = config.getFloat(parameter +"Influence");
            higherIsBetter = config.getBoolean(parameter + "HigherIsBetter");
        } catch (ConfigurationException e) {
            e.printStackTrace();
        }
    }

    public BigDecimal getValue(List<MasterDataObject> influencingMasterDataObjects){
        float value = baseValue;

        for(MasterDataObject object : influencingMasterDataObjects){