jxl.biff.formula
Class Operator

java.lang.Object
  |
  +--jxl.biff.formula.ParseItem
        |
        +--jxl.biff.formula.Operator
Direct Known Subclasses:
Attribute, BinaryOperator, BuiltInFunction, Parenthesis, StringOperator, UnaryOperator, VariableArgFunction

abstract class Operator
extends ParseItem

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


Field Summary
private  ParseItem[] operands
          The items which this operator manipulates.
 
Fields inherited from class jxl.biff.formula.ParseItem
parent
 
Constructor Summary
Operator()
          Constructor
 
Method Summary
protected  void add(ParseItem n)
          Adds operands to this item
protected  ParseItem[] getOperands()
          Gets the operands ie.
abstract  void getOperands(java.util.Stack s)
          Gets the operands for this operator from the stack
(package private) abstract  int getPrecedence()
          Gets the precedence for this operator.
 
Methods inherited from class jxl.biff.formula.ParseItem
getBytes, getString, setParent
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

operands

private ParseItem[] operands
The items which this operator manipulates. There will be at most two
Constructor Detail

Operator

public Operator()
Constructor
Method Detail

add

protected void add(ParseItem n)
Adds operands to this item

getOperands

public abstract void getOperands(java.util.Stack s)
Gets the operands for this operator from the stack

getOperands

protected ParseItem[] getOperands()
Gets the operands ie. the children of the node

getPrecedence

abstract int getPrecedence()
Gets the precedence for this operator. Operator precedents run from 1 to 5, one being the highest, 5 being the lowest
Returns:
the operator precedence