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

BoolPtg

public class BoolPtg extends Ptg
Boolean (boolean) Stores a (java) boolean value in a formula.
author
Paul Krause (pkrause at soundbite dot com)
author
Andrew C. Oliver (acoliver at apache dot org)
author
Jason Height (jheight at chariot dot net dot au)

Fields Summary
public static final int
SIZE
public static final byte
sid
private boolean
field_1_value
Constructors Summary
private BoolPtg()


      
      //Required for clone methods
    
public BoolPtg(RecordInputStream in)

        field_1_value = (in.readByte() == 1);
    
public BoolPtg(String formulaToken)

        field_1_value = (formulaToken.equals("TRUE"));
    
Methods Summary
public java.lang.Objectclone()

        BoolPtg ptg = new BoolPtg();
        ptg.field_1_value = field_1_value;
        return ptg;
    
public bytegetDefaultOperandClass()

return Ptg.CLASS_VALUE;
public intgetSize()

        return SIZE;
    
public booleangetValue()

        return field_1_value;
    
public voidsetValue(boolean value)

        field_1_value = value;
    
public java.lang.StringtoFormulaString(org.apache.poi.hssf.model.Workbook book)

        return field_1_value ? "TRUE" : "FALSE";
    
public voidwriteBytes(byte[] array, int offset)

        array[ offset + 0 ] = sid;
        array[ offset + 1 ] = (byte) (field_1_value ? 1 : 0);