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

LessThanPtg

public class LessThanPtg extends OperationPtg
Less than operator PTG "<". The SID is taken from the Openoffice.orgs Documentation of the Excel File Format, Table 3.5.7
author
Cameron Riley (criley at ekmail.com)

Fields Summary
public static final int
SIZE
the size of the Ptg
public static final byte
sid
the sid for the less than operator as hex
private static final String
LESSTHAN
identifier for LESS THAN char
Constructors Summary
public LessThanPtg()
Constructor. Creates new LessThanPtg


               
     
    
        //deliberately empty
    
public LessThanPtg(RecordInputStream in)
Constructor. Create a new LessThanPtg.

param
data the byte array to have the PTG added to
param
offset the offset to the PTG to.

        //deliberately empty
    
Methods Summary
public java.lang.Objectclone()
Implementation of clone method from Object

return
Object a clone of this class as an Object

        return new LessThanPtg();
    
public bytegetDefaultOperandClass()
Get the default operands class value

return
byte the Ptg Class Value as a byte from the Ptg Parent object

        return Ptg.CLASS_VALUE;
    
public intgetNumberOfOperands()
Get the number of operands for the Less than operator

return
int the number of operands

        return 2;
    
public intgetSize()
Get the size of the sid

return
int the size of the sid in terms of byte additions to an array

        return SIZE;
    
public intgetType()
Get the type of PTG for Less Than

return
int the identifier for the type

        return TYPE_BINARY;
    
public java.lang.StringtoFormulaString(org.apache.poi.hssf.model.Workbook book)
Implementation of method from Ptg

param
book the Sheet References

        return this.LESSTHAN;
    
public java.lang.StringtoFormulaString(java.lang.String[] operands)
Implementation of method from OperationsPtg

param
operands a String array of operands
return
String the Formula as a String

        StringBuffer buffer = new StringBuffer();
        buffer.append(operands[ 0 ]);
        buffer.append(this.LESSTHAN);
        buffer.append(operands[ 1 ]);
        return buffer.toString();
    
public voidwriteBytes(byte[] array, int offset)
Write the sid to an array

param
array the array of bytes to write the sid to
param
offset the offset to add the sid to

        array[ offset + 0 ] = sid;