jxl.biff.formula
Class BinaryOperator

java.lang.Object
  |
  +--jxl.biff.formula.ParseItem
        |
        +--jxl.biff.formula.Operator
              |
              +--jxl.biff.formula.BinaryOperator
All Implemented Interfaces:
ParsedThing
Direct Known Subclasses:
Add, Concatenate, Divide, Equal, GreaterEqual, GreaterThan, LessEqual, LessThan, Multiply, NotEqual, Power, Subtract

abstract class BinaryOperator
extends Operator
implements ParsedThing

A cell reference in a formula


Fields inherited from class jxl.biff.formula.Operator
operands
 
Fields inherited from class jxl.biff.formula.ParseItem
parent
 
Constructor Summary
BinaryOperator()
          Constructor
 
Method Summary
(package private)  byte[] getBytes()
          Gets the token representation of this item in RPN
 void getOperands(java.util.Stack s)
          Gets the operands for this operator from the stack
 void getString(java.lang.StringBuffer buf)
          Gets the string version of this binary operator
(package private) abstract  java.lang.String getSymbol()
          Abstract method which gets the binary operator string symbol
(package private) abstract  Token getToken()
          Abstract method which gets the token for this operator
 int read(byte[] data, int pos)
          Reads the ptg data from the array starting at the specified position
 
Methods inherited from class jxl.biff.formula.Operator
add, getOperands, getPrecedence
 
Methods inherited from class jxl.biff.formula.ParseItem
setParent
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

BinaryOperator

public BinaryOperator()
Constructor
Method Detail

read

public int read(byte[] data,
                int pos)
Reads the ptg data from the array starting at the specified position
Specified by:
read in interface ParsedThing
Parameters:
data - the RPN array
pos - the current position in the array, excluding the ptg identifier
Returns:
the number of bytes read

getOperands

public void getOperands(java.util.Stack s)
Gets the operands for this operator from the stack
Overrides:
getOperands in class Operator

getString

public void getString(java.lang.StringBuffer buf)
Gets the string version of this binary operator
Overrides:
getString in class ParseItem
Parameters:
buf - a the string buffer

getBytes

byte[] getBytes()
Gets the token representation of this item in RPN
Overrides:
getBytes in class ParseItem
Returns:
the bytes applicable to this formula

getSymbol

abstract java.lang.String getSymbol()
Abstract method which gets the binary operator string symbol
Returns:
the string symbol for this token

getToken

abstract Token getToken()
Abstract method which gets the token for this operator
Returns:
the string symbol for this token