1 16 17 package org.apache.poi.hssf.record.formula; 18 19 import java.util.List ; 20 import org.apache.poi.hssf.model.Workbook; 21 22 27 28 public class SubtractPtg 29 extends OperationPtg 30 { 31 public final static int SIZE = 1; 32 public final static byte sid = 0x04; 33 34 public SubtractPtg() 35 { 36 } 37 38 public SubtractPtg(byte [] data, int offset) 39 { 40 41 } 43 44 public void writeBytes(byte [] array, int offset) 45 { 46 array[ offset + 0 ] = sid; 47 } 48 49 public int getSize() 50 { 51 return SIZE; 52 } 53 54 public int getType() 55 { 56 return TYPE_BINARY; 57 } 58 59 public int getNumberOfOperands() 60 { 61 return 2; 62 } 63 64 public String toFormulaString(Workbook book) 65 { 66 return "-"; 67 } 68 69 70 public String toFormulaString(String [] operands) { 71 StringBuffer buffer = new StringBuffer (); 72 73 buffer.append(operands[ 0 ]); 74 buffer.append("-"); 75 buffer.append(operands[ 1 ]); 76 return buffer.toString(); 77 } 78 79 public Object clone() { 80 return new SubtractPtg(); 81 } 82 } 83 | Popular Tags |