Example usage for org.apache.poi.ss.formula.ptg AbstractFunctionPtg getName

List of usage examples for org.apache.poi.ss.formula.ptg AbstractFunctionPtg getName

Introduction

In this page you can find the example usage for org.apache.poi.ss.formula.ptg AbstractFunctionPtg getName.

Prototype

public final String getName() 

Source Link

Usage

From source file:uk.ac.liverpool.spreadsheet.FormulaRenderer.java

License:Apache License

public static String toFormulaString(AbstractFunctionPtg a, String[] operands) {
    StringBuilder buf = new StringBuilder();

    if (a.isExternalFunction()) {
        buf.append(operands[0]); // first operand is actually the function name
        appendArgs(buf, 1, operands);/* www. ja v a  2s .c  o  m*/
    } else {
        buf.append(a.getName());
        appendArgs(buf, 0, operands);
    }
    return buf.toString();
}