Methods Summary |
---|
public java.lang.Object | clone()
AttrPtg ptg = new AttrPtg();
ptg.field_1_options = field_1_options;
ptg.field_2_data = field_2_data;
return ptg;
|
public short | getData()
return field_2_data;
|
public byte | getDefaultOperandClass()return Ptg.CLASS_VALUE;
|
public int | getNumberOfOperands()
return 1;
|
public byte | getOptions()
return field_1_options;
|
public int | getSize()
return SIZE;
|
public int | getType()
return -1;
|
public boolean | isBaxcel()
return baxcel.isSet(getOptions());
|
public boolean | isGoto()
return optGoto.isSet(getOptions());
|
public boolean | isOptimizedChoose()
return optiChoose.isSet(getOptions());
|
public boolean | isOptimizedIf()
return optiIf.isSet(getOptions());
|
public boolean | isSemiVolatile()
return semiVolatile.isSet(getOptions());
|
public boolean | isSpace()
return space.isSet(getOptions());
|
public boolean | isSum()
return sum.isSet(getOptions());
|
public void | setData(short data)
field_2_data = data;
|
public void | setGoto(boolean isGoto)Flags this ptg as a goto/jump
field_1_options=optGoto.setByteBoolean(field_1_options, isGoto);
|
public void | setOptimizedIf(boolean bif)
field_1_options=optiIf.setByteBoolean(field_1_options,bif);
|
public void | setOptions(byte options)
field_1_options = options;
|
public void | setSum(boolean bsum)
field_1_options=sum.setByteBoolean(field_1_options,bsum);
|
public java.lang.String | toFormulaString(java.lang.String[] operands)
if(space.isSet(field_1_options)) {
return operands[ 0 ];
} else if (optiIf.isSet(field_1_options)) {
return toFormulaString((Workbook)null) + "(" + operands[ 0 ] +")";
} else if (optGoto.isSet(field_1_options)) {
return toFormulaString((Workbook)null) + operands[0]; //goto isn't a real formula element should not show up
} else {
return toFormulaString((Workbook)null) + "(" + operands[ 0 ] + ")";
}
|
public java.lang.String | toFormulaString(org.apache.poi.hssf.model.Workbook book)
if(semiVolatile.isSet(field_1_options)) {
return "ATTR(semiVolatile)";
}
if(optiIf.isSet(field_1_options)) {
return "IF";
}
if( optiChoose.isSet(field_1_options)) {
return "CHOOSE";
}
if(optGoto.isSet(field_1_options)) {
return "";
}
if(sum.isSet(field_1_options)) {
return "SUM";
}
if(baxcel.isSet(field_1_options)) {
return "ATTR(baxcel)";
}
if(space.isSet(field_1_options)) {
return "";
}
return "UNKNOWN ATTRIBUTE";
|
public java.lang.String | toString()
StringBuffer buffer = new StringBuffer();
buffer.append("AttrPtg\n");
buffer.append("options=").append(field_1_options).append("\n");
buffer.append("data =").append(field_2_data).append("\n");
buffer.append("semi =").append(isSemiVolatile()).append("\n");
buffer.append("optimif=").append(isOptimizedIf()).append("\n");
buffer.append("optchos=").append(isOptimizedChoose()).append("\n");
buffer.append("isGoto =").append(isGoto()).append("\n");
buffer.append("isSum =").append(isSum()).append("\n");
buffer.append("isBaxce=").append(isBaxcel()).append("\n");
buffer.append("isSpace=").append(isSpace()).append("\n");
return buffer.toString();
|
public void | writeBytes(byte[] array, int offset)
array[offset]=sid;
array[offset+1]=field_1_options;
LittleEndian.putShort(array,offset+2,field_2_data);
|