Example usage for org.apache.commons.configuration Configuration getDouble

List of usage examples for org.apache.commons.configuration Configuration getDouble

Introduction

In this page you can find the example usage for org.apache.commons.configuration Configuration getDouble.

Prototype

double getDouble(String key);

Source Link

Document

Get a double associated with the given configuration key.

Usage

From source file:com.manydesigns.elements.configuration.CommonsConfigurationFunctions.java

public static double getDouble(Configuration configuration, String key) {
    return configuration.getDouble(key);
}

From source file:es.udc.gii.common.eaf.stoptest.BestMeanConvergence.java

/**
 * Configure this stop test.//  w  w w.  ja v a  2  s.c  o  m
 * @param conf Configuration object which contains the configuration values.
 */
@Override
public void configure(Configuration conf) {
    this.convergenceRate = conf.getDouble("ConvergenceRate");

}

From source file:es.udc.gii.common.eaf.plugin.parameter.Constant.java

@Override
public void configure(Configuration conf) {
    if (conf.containsKey("Value")) {
        this.value = conf.getDouble("Value");
    }/*w  ww  .  j a v a2s  . co  m*/
}

From source file:es.udc.gii.common.eaf.stoptest.TolFunStopTest.java

@Override
public void configure(Configuration conf) {

    if (conf.containsKey("TolFun")) {
        tol_fun = conf.getDouble("TolFun");
    } else {//  w w w.  ja v  a2s. co  m
        ConfWarning w = new ConfWarning("TolFun", this.tol_fun);
        w.warn();
    }

}

From source file:es.udc.gii.common.eaf.stoptest.TolFunHistStopTest.java

@Override
public void configure(Configuration conf) {

    if (conf.containsKey("TolFunHist")) {
        tol_fun_hist = conf.getDouble("TolFunHist");
    } else {//from   ww w  .j  ava 2 s.  co m
        ConfWarning w = new ConfWarning("TolFunHist", this.tol_fun_hist);
        w.warn();
    }

}

From source file:es.udc.gii.common.eaf.plugin.parameter.LinearAnnealing.java

@Override
public void configure(Configuration conf) {
    if (conf.containsKey("A")) {
        this.a = conf.getDouble("A");
    }//from ww  w .j  av a2 s  . co  m
    if (conf.containsKey("B")) {
        this.b = conf.getDouble("B");
    }
    if (conf.containsKey("C")) {
        this.c = conf.getDouble("C");
    }
    try {
        if (conf.containsKey("Counter.Class")) {
            this.counter = (StopTestPlugin) Class.forName(conf.getString("Counter.Class")).newInstance();
            this.counter.configure(conf.subset("Counter"));
        }
    } catch (Exception ex) {
        ex.printStackTrace();
    }
}

From source file:es.udc.gii.common.eaf.stoptest.PerformanceFitnessStopTest.java

/**
 * Configure this stop test./*from  w  w  w . j av a2  s.c o m*/
 * @param conf Configuration object which contains the configuration values.
 */
@Override
public void configure(Configuration conf) {
    this.goal = conf.getDouble("Goal");
}

From source file:es.udc.gii.common.eaf.stoptest.cma.CMATolXUpStopTest.java

@Override
public void configure(Configuration conf) {

    if (conf.containsKey("TolXUpFactor")) {
        this.tol_up_x_factor = conf.getDouble("TolXUpFactor");
    } else {/*from   www.j a va2 s.  c  om*/
        ConfWarning w = new ConfWarning("TolXUpFactor", this.tol_up_x_factor);
        w.warn();
    }

}

From source file:es.udc.gii.common.eaf.stoptest.cma.CMATolXStopTest.java

@Override
public void configure(Configuration conf) {

    if (conf.containsKey("TolX")) {
        this.tol_x = conf.getDouble("TolX");
    } else {//from w w w .j a va2s  .co m
        ConfWarning w = new ConfWarning("TolX", this.tol_x);
        w.warn();
    }

    if (conf.containsKey("TolXFactor")) {
        this.tol_x_factor = conf.getDouble("TolXFactor");
    } else {
        ConfWarning w = new ConfWarning("TolXFactor", this.tol_x_factor);
        w.warn();
    }

}

From source file:es.udc.gii.common.eaf.problem.constraint.Constraint.java

@Override
public void configure(Configuration conf) {
    if (conf.containsKey("ConstraintValue")) {
        this.constraint_value = conf.getDouble("ConstraintValue");
    } else {/*from  w  ww . j av a2  s .c  o  m*/
        (new ConfWarning("Constraint.ConstraintValue", constraint_value)).warn();
    }
}