1 16 17 18 23 package org.apache.poi.hssf.record.formula; 24 25 import java.util.List ; 26 27 import org.apache.poi.hssf.model.Workbook; 28 29 33 public class GreaterThanPtg 34 extends OperationPtg 35 { 36 public final static int SIZE = 1; 37 public final static byte sid = 0x0D; 38 private final static String GREATERTHAN = ">"; 39 40 43 public GreaterThanPtg() 44 { 45 } 47 48 53 public GreaterThanPtg(byte [] data, int offset) 54 { 55 } 57 58 63 public void writeBytes(byte [] array, int offset) 64 { 65 array[ offset + 0 ] = sid; 66 } 67 68 72 public int getSize() 73 { 74 return SIZE; 75 } 76 77 81 public int getType() 82 { 83 return TYPE_BINARY; 84 } 85 86 90 public int getNumberOfOperands() 91 { 92 return 2; 93 } 94 95 99 public String toFormulaString(Workbook book) 100 { 101 return this.GREATERTHAN; 102 } 103 104 109 public String toFormulaString(String [] operands) 110 { 111 StringBuffer buffer = new StringBuffer (); 112 113 buffer.append(operands[ 0 ]); 114 buffer.append(this.GREATERTHAN); 115 buffer.append(operands[ 1 ]); 116 return buffer.toString(); 117 } 118 119 123 public byte getDefaultOperandClass() 124 { 125 return Ptg.CLASS_VALUE; 126 } 127 128 132 public Object clone() 133 { 134 return new GreaterThanPtg(); 135 } 136 } 137 | Popular Tags |