org.apache.poi.hssf.record.formula
Class ValueOperatorPtg

java.lang.Object
  extended by org.apache.poi.hssf.record.formula.Ptg
      extended by org.apache.poi.hssf.record.formula.OperationPtg
          extended by org.apache.poi.hssf.record.formula.ValueOperatorPtg
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
AddPtg, ConcatPtg, DividePtg, EqualPtg, GreaterEqualPtg, GreaterThanPtg, LessEqualPtg, LessThanPtg, MultiplyPtg, NotEqualPtg, PercentPtg, PowerPtg, SubtractPtg, UnaryMinusPtg, UnaryPlusPtg

public abstract class ValueOperatorPtg
extends OperationPtg

Common superclass of all value operators. Subclasses include all unary and binary operators except for the reference operators (IntersectionPtg, RangePtg, UnionPtg)

Author:
Josh Micich

Field Summary
 
Fields inherited from class org.apache.poi.hssf.record.formula.OperationPtg
TYPE_BINARY, TYPE_FUNCTION, TYPE_UNARY
 
Fields inherited from class org.apache.poi.hssf.record.formula.Ptg
CLASS_ARRAY, CLASS_REF, CLASS_VALUE
 
Constructor Summary
ValueOperatorPtg()
           
 
Method Summary
 byte getDefaultOperandClass()
           
protected abstract  byte getSid()
           
 int getSize()
           
 boolean isBaseToken()
          All Operator Ptgs are base tokens (i.e.
 java.lang.String toFormulaString(HSSFWorkbook book)
          return a string representation of this token alone
 void writeBytes(byte[] array, int offset)
          write this Ptg to a byte array
 
Methods inherited from class org.apache.poi.hssf.record.formula.OperationPtg
getNumberOfOperands, getType, toFormulaString
 
Methods inherited from class org.apache.poi.hssf.record.formula.Ptg
clone, copy, createParsedExpressionTokens, createPtg, getBytes, getEncodedSize, getEncodedSize, getPtgClass, readTokens, serializePtgs, serializePtgStack, setClass, toDebugString, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ValueOperatorPtg

public ValueOperatorPtg()
Method Detail

isBaseToken

public final boolean isBaseToken()
All Operator Ptgs are base tokens (i.e. are not RVA classified)

Specified by:
isBaseToken in class Ptg
Returns:
false if this token is classified as 'reference', 'value', or 'array'

getDefaultOperandClass

public final byte getDefaultOperandClass()
Overrides:
getDefaultOperandClass in class OperationPtg

writeBytes

public final void writeBytes(byte[] array,
                             int offset)
Description copied from class: Ptg
write this Ptg to a byte array

Specified by:
writeBytes in class Ptg

getSid

protected abstract byte getSid()

getSize

public final int getSize()
Specified by:
getSize in class Ptg
Returns:
the encoded length of this Ptg, including the initial Ptg type identifier byte.

toFormulaString

public final java.lang.String toFormulaString(HSSFWorkbook book)
Description copied from class: Ptg
return a string representation of this token alone

Specified by:
toFormulaString in class Ptg


Copyright 2008 The Apache Software Foundation or its licensors, as applicable.