AFC - Abacus Formula Compiler for Java

Decompiled Code For DGET( B$2:E$8, "Profit", B$10:C$11 )

The expression

=DGET( B$2:E$8, "Profit", B$10:C$11 )

is compiled to the following class(es):

package org.formulacompiler.gen;
import org.formulacompiler.runtime.Computation;
import org.formulacompiler.runtime.internal.Environment;
import org.formulacompiler.runtime.internal.Runtime_v2;
import org.formulacompiler.tests.reference.base.Inputs;
import org.formulacompiler.tests.reference.base.Outputs;

final class $Root extends Outputs implements Computation
{
    private final Inputs $inputs;
    final Environment $environment;

    $Root(Inputs inputs, Environment environment) {
        $environment = environment;
        $inputs = inputs;
    }

    final double get$0() {
        return get$1();
    }

    public final double dbl() {
        return get$0();
    }

    final double get$1() {
        double d = 0.0;
        int i = 0;
        if (get$2("Apple", 18.0)) {
            i++;
            d = 105.0;
        }
        if (get$2("Pear", 12.0)) {
            i++;
            d = 96.0;
        }
        if (get$2("Cherry", 13.0)) {
            i++;
            d = 105.0;
        }
        if (get$2("Apple", 14.0)) {
            i++;
            d = 75.0;
        }
        if (get$2("Pear", 9.0)) {
            i++;
            d = 76.8;
        }
        if (get$2("Apple", 8.0)) {
            i++;
            d = 45.0;
        }
        double d_0_;
        if ((double) i == 0.0) {
            Runtime_v2.fun_ERROR("#VALUE! because selection empty in DGET");
            d_0_ = (double) -1;
        } else if ((double) i > 1.0) {
            Runtime_v2.fun_ERROR("#NUM! because selection ambiguous in DGET");
            d_0_ = (double) -1;
        } else
            d_0_ = d;
        return d_0_;
    }

    final boolean get$2(String string, double d) {
        if (string.equalsIgnoreCase("Apple") && d > 10.0)
            return true;
        return false;
    }
}