jxl.biff.formula
abstract class: Operator [javadoc |
source]
java.lang.Object
jxl.biff.formula.ParseItem
jxl.biff.formula.Operator
Direct Known Subclasses:
Plus, Add, UnaryMinus, Attribute, RangeSeparator, Equal, Concatenate, Percent, LessEqual, GreaterThan, Parenthesis, Divide, Subtract, StringOperator, BuiltInFunction, LessThan, NotEqual, Power, Minus, UnaryOperator, Union, Multiply, BinaryOperator, UnaryPlus, VariableArgFunction, GreaterEqual
An operator is a node in a parse tree. Its children can be other
operators or operands
Arithmetic operators and functions are all considered operators
| Methods from jxl.biff.formula.ParseItem: |
|---|
|
adjustRelativeCellReferences, columnInserted, columnRemoved, getBytes, getString, handleImportedCellReferences, isValid, isVolatile, rowInserted, rowRemoved, setAlternateCode, setInvalid, setParent, setVolatile, useAlternateCode |
| Method from jxl.biff.formula.Operator Detail: |
protected void add(ParseItem n) {
n.setParent(this);
// Grow the array
ParseItem[] newOperands = new ParseItem[operands.length + 1];
System.arraycopy(operands, 0, newOperands, 0, operands.length);
newOperands[operands.length] = n;
operands = newOperands;
}
Adds operands to this item |
protected ParseItem[] getOperands() {
return operands;
}
Gets the operands ie. the children of the node |
abstract public void getOperands(Stack s)
Gets the operands for this operator from the stack |
abstract int getPrecedence()
Gets the precedence for this operator. Operator precedents run from
1 to 5, one being the highest, 5 being the lowest |
protected void setOperandAlternateCode() {
for (int i = 0 ; i < operands.length ; i++)
{
operands[i].setAlternateCode();
}
}
Tells the operands to use the alternate code |