/** * Gets the formula as a string */ public String getFormula() { StringBuffer sb = new StringBuffer(); root.getString(sb); return sb.toString(); }
/** * Gets the formula as a string */ public String getFormula() { StringBuffer sb = new StringBuffer(); root.getString(sb); return sb.toString(); }
/** * Gets the formula as a string. Uses the parse tree to do this, and * does not simply return whatever string was passed in */ public String getFormula() { if (parsedFormula == null) { StringBuffer sb = new StringBuffer(); root.getString(sb); parsedFormula = sb.toString(); } return parsedFormula; }
/** * Gets the formula as a string. Uses the parse tree to do this, and * does not simply return whatever string was passed in */ public String getFormula() { if (parsedFormula == null) { StringBuffer sb = new StringBuffer(); root.getString(sb); parsedFormula = sb.toString(); } return parsedFormula; }
public void getString(StringBuffer buf) { ParseItem[] operands = getOperands(); buf.append('('); operands[0].getString(buf); buf.append(')'); }
public void getString(StringBuffer buf) { ParseItem[] operands = getOperands(); buf.append('('); operands[0].getString(buf); buf.append(')'); }
/** * Gets the string * * @param buf */ public void getString(StringBuffer buf) { ParseItem[] operands = getOperands(); buf.append(getSymbol()); operands[0].getString(buf); }
public void getString(StringBuffer buf) { ParseItem[] operands = getOperands(); operands[0].getString(buf); buf.append(getSymbol()); }
public void getString(StringBuffer buf) { ParseItem[] operands = getOperands(); operands[0].getString(buf); buf.append(getSymbol()); }
/** * Gets the string * * @param buf */ public void getString(StringBuffer buf) { ParseItem[] operands = getOperands(); buf.append(getSymbol()); operands[0].getString(buf); }
/** * Gets the string for this functions * * @param buf the buffer to append */ public void getString(StringBuffer buf) { buf.append(function.getName(settings)); buf.append('('); int numArgs = function.getNumArgs(); if (numArgs > 0) { ParseItem[] operands = getOperands(); // arguments are in the same order they were specified operands[0].getString(buf); for (int i = 1; i < numArgs; i++) { buf.append(','); operands[i].getString(buf); } } buf.append(')'); }
/** * Gets the string version of the attribute * * @param buf the buffer to populate */ public void getString(StringBuffer buf) { if ((options & SUM_MASK) != 0) { ParseItem[] operands = getOperands(); buf.append(Function.SUM.getName(settings)); buf.append('('); operands[0].getString(buf); buf.append(')'); } else if ((options & IF_MASK) != 0) { buf.append(Function.IF.getName(settings)); buf.append('('); ParseItem[] operands = ifConditions.getOperands(); // Operands are in the correct order for IFs for (int i = 0; i < operands.length - 1; i++) { operands[i].getString(buf); buf.append(','); } operands[operands.length - 1].getString(buf); buf.append(')'); } }
/** * Gets the string for this functions * * @param buf the buffer to append */ public void getString(StringBuffer buf) { buf.append(function.getName(settings)); buf.append('('); int numArgs = function.getNumArgs(); if (numArgs > 0) { ParseItem[] operands = getOperands(); // arguments are in the same order they were specified operands[0].getString(buf); for (int i = 1; i < numArgs; i++) { buf.append(','); operands[i].getString(buf); } } buf.append(')'); }
/** * Gets the string version of the attribute * * @param buf the buffer to populate */ public void getString(StringBuffer buf) { if ((options & SUM_MASK) != 0) { ParseItem[] operands = getOperands(); buf.append(Function.SUM.getName(settings)); buf.append('('); operands[0].getString(buf); buf.append(')'); } else if ((options & IF_MASK) != 0) { buf.append(Function.IF.getName(settings)); buf.append('('); ParseItem[] operands = ifConditions.getOperands(); // Operands are in the correct order for IFs for (int i = 0; i < operands.length - 1; i++) { operands[i].getString(buf); buf.append(','); } operands[operands.length - 1].getString(buf); buf.append(')'); } }