Package org.boris.expr.function.excel

Source Code of org.boris.expr.function.excel.AVERAGEA

package org.boris.expr.function.excel;

import org.boris.expr.Expr;
import org.boris.expr.ExprDouble;
import org.boris.expr.ExprException;
import org.boris.expr.function.ForEachNumberAFunction;
import org.boris.expr.util.Counter;

public class AVERAGEA extends ForEachNumberAFunction
{
    protected void value(Counter counter, double value) {
        counter.count++;
        counter.value += value;
    }

    protected Expr evaluate(Counter counter) throws ExprException {
        return new ExprDouble(counter.value / counter.count);
    }
}
TOP

Related Classes of org.boris.expr.function.excel.AVERAGEA

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.