FileDocCategorySizeDatePackage
ParenthesisPtg.javaAPI DocApache Poi 3.0.12423Mon Jan 01 12:39:40 GMT 2007org.apache.poi.hssf.record.formula

ParenthesisPtg

public class ParenthesisPtg extends OperationPtg
While formula tokens are stored in RPN order and thus do not need parenthesis for precedence reasons, Parenthesis tokens ARE written to ensure that user entered parenthesis are displayed as-is on reading back Avik Sengupta <lists@aviksengupta.com> Andrew C. Oliver (acoliver at apache dot org)
author
Jason Height (jheight at chariot dot net dot au)

Fields Summary
private static final int
SIZE
public static final byte
sid
Constructors Summary
public ParenthesisPtg()

   
     
    
    
public ParenthesisPtg(RecordInputStream in)


        // doesn't need anything
    
Methods Summary
public java.lang.Objectclone()

      return new ParenthesisPtg();
    
public bytegetDefaultOperandClass()

return Ptg.CLASS_VALUE;
public intgetNumberOfOperands()

        return 1;
    
public intgetSize()

        return SIZE;
    
public intgetType()

        return TYPE_BINARY;
    
public java.lang.StringtoFormulaString(org.apache.poi.hssf.model.Workbook book)

        return "()";
    
public java.lang.StringtoFormulaString(java.lang.String[] operands)

        return "("+operands[0]+")";
    
public voidwriteBytes(byte[] array, int offset)

        array[ offset + 0 ] = sid;