Methods Summary |
---|
public java.lang.Object | clone()
try
{
// todo: clone tokens? or are they immutable?
return super.clone();
}
catch ( CloneNotSupportedException e )
{
// should not happen
return null;
}
|
public int | fillField(org.apache.poi.hssf.record.RecordInputStream in)
short tokenSize = in.readShort();
formulaTokens = Ptg.createParsedExpressionTokens(tokenSize, in);
return tokenSize + 2;
|
public java.util.Stack | getFormulaTokens()
return (Stack)this.formulaTokens.clone();
|
public int | getSize()
int size = 0;
for ( Iterator iterator = formulaTokens.iterator(); iterator.hasNext(); )
{
Ptg token = (Ptg) iterator.next();
size += token.getSize();
}
return size + 2;
|
public int | serializeField(int offset, byte[] data)
int size = getSize();
LittleEndian.putShort(data, offset, (short)(size - 2));
int pos = offset + 2;
pos += Ptg.serializePtgStack(formulaTokens, data, pos);
return size;
|
public void | setFormulaTokens(java.util.Stack formulaTokens)
this.formulaTokens = (Stack) formulaTokens.clone();
|
public void | toString(java.lang.StringBuffer buffer)
for ( int k = 0; k < formulaTokens.size(); k++ )
{
buffer.append( "Formula " )
.append( k )
.append( "=" )
.append( formulaTokens.get( k ).toString() )
.append( "\n" )
.append( ( (Ptg) formulaTokens.get( k ) ).toDebugString() )
.append( "\n" );
}
|
public java.lang.String | toString()
StringBuffer b = new StringBuffer();
toString( b );
return b.toString();
|