## org.apache.poi.hssf.record.formula
Class Ptg

    java.lang.Object
      org.apache.poi.hssf.record.formula.Ptg

Direct Known Subclasses:
  Area3DPtg, AreaPtg, BoolPtg, ControlPtg, ExpPtg, IntPtg, MemErrPtg, MissingArgPtg, NamePtg, NameXPtg, NumberPtg, OperationPtg, Ref3DPtg, ReferencePtg, StringPtg, UnknownPtg

public abstract class Ptg
extends java.lang.Object

Author:
  andy, avik, Jason Height (jheight at chariot dot net dot au)

Field Summary
`static byte` `CLASS_ARRAY`
`static byte` `CLASS_REF`
`static byte` `CLASS_VALUE`
`protected byte` `ptgClass`

Constructor Summary
`Ptg()`

Method Summary
`abstract java.lang.Object` `clone()`
`static Ptg` `createPtg(byte[] data, int offset)` convert infix order ptg list to rpn order ptg list
`byte[]` `getBytes()`
`abstract byte` `getDefaultOperandClass()`
`byte` `getPtgClass()` returns the class (REF/VALUE/ARRAY) for this Ptg
`abstract int` `getSize()`
`void` `setClass(byte thePtgClass)`
`java.lang.String` `toDebugString()` dump a debug representation (hexdump) to a string
`abstract java.lang.String` `toFormulaString(Workbook book)` return a string representation of this token alone
`java.lang.String` `toString()` Overridden toString method to ensure object hash is not printed.
`abstract void` `writeBytes(byte[] array, int offset)` write this Ptg to a byte array

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### CLASS_REF

    public static final byte CLASS_REF

See Also:
  Constant Field Values

### CLASS_VALUE

    public static final byte CLASS_VALUE

See Also:
  Constant Field Values

### CLASS_ARRAY

    public static final byte CLASS_ARRAY

See Also:
  Constant Field Values

### ptgClass

    protected byte ptgClass

Constructor Detail

### Ptg

    public Ptg()

Method Detail

### createPtg

    public static Ptg createPtg(byte[] data,
                                int offset)

  convert infix order ptg list to rpn order ptg list

  Returns:
    List ptgs in RPN order

### getSize

    public abstract int getSize()

### getBytes

    public final byte[] getBytes()

### writeBytes

    public abstract void writeBytes(byte[] array,
                                    int offset)

  write this Ptg to a byte array

### toFormulaString

    public abstract java.lang.String toFormulaString(Workbook book)

  return a string representation of this token alone

### toDebugString

    public java.lang.String toDebugString()

  dump a debug representation (hexdump) to a string

### toString

    public java.lang.String toString()

  Overridden toString method to ensure object hash is not printed. This helps get rid of gratuitous diffs when comparing two dumps Subclasses may output more relevant information by overriding this method

### setClass

    public void setClass(byte thePtgClass)

### getPtgClass

    public byte getPtgClass()

  returns the class (REF/VALUE/ARRAY) for this Ptg

### getDefaultOperandClass

    public abstract byte getDefaultOperandClass()

### clone

    public abstract java.lang.Object clone()

Copyright © 2003 Apache Software Foundation.