/* FinanceFunction.java

	Purpose:
		
	Description:
		
	History:
		Apr 19, 2010 4:34:26 PM, Created by henrichen

Copyright (C) 2010 Potix Corporation. All Rights Reserved.

*/

package org.zkoss.zssex.formula.fn;

import org.zkoss.poi.ss.formula.eval.ValueEval;

/**
 * Excel financial functions.
 * @author henrichen
 */
public class FinancialFns  {
	private FinancialFns() {
	}
	
	public static final ValueEval db(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
		return FinanceFunctionImpl.DB.evaluate(args, srcRowIndex, srcColumnIndex);
	}
	public static final ValueEval ddb(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
		return FinanceFunctionImpl.DDB.evaluate(args, srcRowIndex, srcColumnIndex);
	}
	public static final ValueEval ipmt(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
		return FinanceFunctionImpl.IPMT.evaluate(args, srcRowIndex, srcColumnIndex);
	}
	public static final ValueEval ppmt(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
		return FinanceFunctionImpl.PPMT.evaluate(args, srcRowIndex, srcColumnIndex);
	}
	public static final ValueEval sln(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
		return FinanceFunctionImpl.SLN.evaluate(args, srcRowIndex, srcColumnIndex);
	};
	public static final ValueEval syd(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
		return FinanceFunctionImpl.SYD.evaluate(args, srcRowIndex, srcColumnIndex);
	};
	public static final ValueEval accrint(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
		return FinanceFunctionImpl.ACCRINT.evaluate(args, srcRowIndex, srcColumnIndex);
	};
	public static final ValueEval accrintm(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
		return FinanceFunctionImpl.ACCRINTM.evaluate(args, srcRowIndex, srcColumnIndex);
	};
	public static final ValueEval amordegrc(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
		return FinanceFunctionImpl.AMORDEGRC.evaluate(args, srcRowIndex, srcColumnIndex);
	};
	public static final ValueEval amorlinc(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
		return FinanceFunctionImpl.AMORLINC.evaluate(args, srcRowIndex, srcColumnIndex);
	};
	
	public static final ValueEval coupdaybs(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
		return FinanceFunctionImpl.COUPDAYBS.evaluate(args, srcRowIndex, srcColumnIndex);
	};
	public static final ValueEval coupdays(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
		return FinanceFunctionImpl.COUPDAYS.evaluate(args, srcRowIndex, srcColumnIndex);
	};
	public static final ValueEval coupdaysnc(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
		return FinanceFunctionImpl.COUPDAYSNC.evaluate(args, srcRowIndex, srcColumnIndex);
	};
	public static final ValueEval coupncd(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
		return FinanceFunctionImpl.COUPNCD.evaluate(args, srcRowIndex, srcColumnIndex);
	};
	public static final ValueEval coupnum(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
		return FinanceFunctionImpl.COUPNUM.evaluate(args, srcRowIndex, srcColumnIndex);
	};
	public static final ValueEval couppcd(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
		return FinanceFunctionImpl.COUPPCD.evaluate(args, srcRowIndex, srcColumnIndex);
	};
	public static final ValueEval cumipmt(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
		return FinanceFunctionImpl.CUMIPMT.evaluate(args, srcRowIndex, srcColumnIndex);
	};
	public static final ValueEval cumprinc(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
		return FinanceFunctionImpl.CUMPRINC.evaluate(args, srcRowIndex, srcColumnIndex);
	};
	public static final ValueEval disc(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
		return FinanceFunctionImpl.DISC.evaluate(args, srcRowIndex, srcColumnIndex);
	};
	public static final ValueEval dollarde(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
		return FinanceFunctionImpl.DOLLARDE.evaluate(args, srcRowIndex, srcColumnIndex);
	};
	public static final ValueEval dollarfr(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
		return FinanceFunctionImpl.DOLLARFR.evaluate(args, srcRowIndex, srcColumnIndex);
	};
	public static final ValueEval duration(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
		return FinanceFunctionImpl.DURATION.evaluate(args, srcRowIndex, srcColumnIndex);
	};
	public static final ValueEval effect(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
		return FinanceFunctionImpl.EFFECT.evaluate(args, srcRowIndex, srcColumnIndex);
	};
	public static final ValueEval fvschedule(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
		return FinanceFunctionImpl.FVSCHEDULE.evaluate(args, srcRowIndex, srcColumnIndex);
	};
	public static final ValueEval intrate(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
		return FinanceFunctionImpl.INTRATE.evaluate(args, srcRowIndex, srcColumnIndex);
	};
	public static final ValueEval nominal(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
		return FinanceFunctionImpl.NOMINAL.evaluate(args, srcRowIndex, srcColumnIndex);
	};
	//ZSS-251, this implementation can't pass unit-test, ignored in tld, and use poi's implementation
	public static final ValueEval npv(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
		return FinanceFunctionImpl.NPV.evaluate(args, srcRowIndex, srcColumnIndex);
	};

	public static final ValueEval price(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
		return FinanceFunctionImpl.PRICE.evaluate(args, srcRowIndex, srcColumnIndex);
	};
	public static final ValueEval pricedisc(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
		return FinanceFunctionImpl.PRICEDISC.evaluate(args, srcRowIndex, srcColumnIndex);
	};
	public static final ValueEval pricemat(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
		return FinanceFunctionImpl.PRICEMAT.evaluate(args, srcRowIndex, srcColumnIndex);
	};
	
	public static final ValueEval received(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
		return FinanceFunctionImpl.RECEIVED.evaluate(args, srcRowIndex, srcColumnIndex);
	};
	public static final ValueEval tbilleq(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
		return FinanceFunctionImpl.TBILLEQ.evaluate(args, srcRowIndex, srcColumnIndex);
	};
	public static final ValueEval tbillprice(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
		return FinanceFunctionImpl.TBILLPRICE.evaluate(args, srcRowIndex, srcColumnIndex);
	};
	public static final ValueEval tbillyield(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
		return FinanceFunctionImpl.TBILLYIELD.evaluate(args, srcRowIndex, srcColumnIndex);
	};
	public static final ValueEval xnpv(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
		return FinanceFunctionImpl.XNPV.evaluate(args, srcRowIndex, srcColumnIndex);
	};
	public static final ValueEval yield(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
		return FinanceFunctionImpl.YIELD.evaluate(args, srcRowIndex, srcColumnIndex);
	};
	public static final ValueEval yielddisc(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
		return FinanceFunctionImpl.YIELDDISC.evaluate(args, srcRowIndex, srcColumnIndex);
	};
	public static final ValueEval yieldmat(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
		return FinanceFunctionImpl.YIELDMAT.evaluate(args, srcRowIndex, srcColumnIndex);
	};

}
