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

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

public class ReferencePtg
extends Ptg

ReferencePtg - handles references (such as A1, A2, IA4)

Author:
  Andrew C. Oliver (acoliver@apache.org), Jason Height (jheight at chariot dot net dot au)

Field Summary
`static byte` `sid`

Fields inherited from class org.apache.poi.hssf.record.formula.Ptg
`CLASS_ARRAY, CLASS_REF, CLASS_VALUE, ptgClass`

Constructor Summary
`ReferencePtg(byte[] data, int offset)` Creates new ValueReferencePtg
`ReferencePtg(java.lang.String cellref)` Takes in a String represnetation of a cell reference and fills out the numeric fields.

Method Summary
`java.lang.Object` `clone()`
`short` `getColumn()`
`short` `getColumnRaw()`
`byte` `getDefaultOperandClass()`
`short` `getRow()`
`int` `getSize()`
`boolean` `isColRelative()`
`boolean` `isRowRelative()`
`void` `setColRelative(boolean rel)`
`void` `setColumn(short col)`
`void` `setColumnRaw(short col)`
`void` `setRow(short row)`
`void` `setRowRelative(boolean rel)`
`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.
`void` `writeBytes(byte[] array, int offset)` write this Ptg to a byte array

Methods inherited from class org.apache.poi.hssf.record.formula.Ptg
`createPtg, getBytes, getPtgClass, setClass, toDebugString`

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

Field Detail

### sid

    public static final byte sid

See Also:
  Constant Field Values

Constructor Detail

### ReferencePtg

    public ReferencePtg(java.lang.String cellref)

  Takes in a String represnetation of a cell reference and fills out the numeric fields.

### ReferencePtg

    public ReferencePtg(byte[] data,
                        int offset)

  Creates new ValueReferencePtg

Method Detail

### toString

    public java.lang.String toString()

  Description copied from class: `Ptg`
  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

  Overrides:
    `toString` in class `Ptg`

### writeBytes

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

  Description copied from class: `Ptg`
  write this Ptg to a byte array

  Specified by:
    `writeBytes` in class `Ptg`

### setRow

    public void setRow(short row)

### getRow

    public short getRow()

### isRowRelative

    public boolean isRowRelative()

### setRowRelative

    public void setRowRelative(boolean rel)

### isColRelative

    public boolean isColRelative()

### setColRelative

    public void setColRelative(boolean rel)

### setColumnRaw

    public void setColumnRaw(short col)

### getColumnRaw

    public short getColumnRaw()

### setColumn

    public void setColumn(short col)

### getColumn

    public short getColumn()

### getSize

    public int getSize()

  Specified by:
    `getSize` in class `Ptg`

### toFormulaString

    public java.lang.String toFormulaString(Workbook book)

  Description copied from class: `Ptg`
  return a string representation of this token alone

  Specified by:
    `toFormulaString` in class `Ptg`

### getDefaultOperandClass

    public byte getDefaultOperandClass()

  Specified by:
    `getDefaultOperandClass` in class `Ptg`

### clone

    public java.lang.Object clone()

  Specified by:
    `clone` in class `Ptg`

Copyright © 2003 Apache Software Foundation.