mirror of https://github.com/apache/poi.git
rollign out some of my stuff. Like Avik's stuff better. (for formulas)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@352524 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
98d4379b0c
commit
ace1aa96f0
|
@ -140,12 +140,7 @@ public class AddPtg
|
|||
buffer.append(operands[ 1 ].toFormulaString());
|
||||
return buffer.toString();
|
||||
}
|
||||
|
||||
|
||||
public int getPrecedence() {
|
||||
return 5;
|
||||
}
|
||||
|
||||
|
||||
public int getStringLength() {
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -119,11 +119,7 @@ public class DividePtg
|
|||
buffer.append(operands[ 1 ].toFormulaString());
|
||||
return buffer.toString();
|
||||
}
|
||||
|
||||
public int getPrecedence() {
|
||||
return 4;
|
||||
}
|
||||
|
||||
|
||||
public int getStringLength() {
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -26,11 +26,7 @@ public class DummyFunctionPtg extends OperationPtg {
|
|||
name=pName;
|
||||
numOperands = pNumOperands;
|
||||
}
|
||||
|
||||
public int getPrecedence() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
public int getType() {
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -154,11 +154,7 @@ public class IntPtg
|
|||
public static boolean isNextStringToken(String formula, int pos) {
|
||||
return (parseString(formula,pos) != null);
|
||||
}
|
||||
|
||||
public int getPrecedence() {
|
||||
return 5;
|
||||
}
|
||||
|
||||
|
||||
public int getStringLength() {
|
||||
return strlen;
|
||||
}
|
||||
|
|
|
@ -145,11 +145,7 @@ public class MultiplyPtg
|
|||
public void manipulate(List source, List results, int pos) {
|
||||
standardBinaryManipulation(source, results, pos);
|
||||
}
|
||||
|
||||
public int getPrecedence() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
|
||||
public static boolean isNextStringToken(String formula, int pos) {
|
||||
boolean retval = false;
|
||||
while (pos < formula.length() && Character.isWhitespace(formula.charAt(pos))) {
|
||||
|
|
|
@ -77,8 +77,6 @@ public abstract class OperationPtg extends Ptg
|
|||
|
||||
public abstract String toFormulaString(String[] operands);
|
||||
|
||||
public abstract int getPrecedence();
|
||||
|
||||
public abstract int getNumberOfOperands();
|
||||
|
||||
/**
|
||||
|
|
|
@ -110,10 +110,6 @@ public class PowerPtg
|
|||
return "^";
|
||||
}
|
||||
|
||||
public int getPrecedence() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
public String toFormulaString(Ptg [] operands)
|
||||
{
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
|
|
|
@ -120,9 +120,6 @@ public class SubtractPtg
|
|||
return buffer.toString();
|
||||
}
|
||||
|
||||
public int getPrecedence() {
|
||||
return 5;
|
||||
}
|
||||
|
||||
public int getStringLength() {
|
||||
return 1;
|
||||
|
|
Loading…
Reference in New Issue