1 16 17 18 23 package org.apache.poi.hssf.record.formula; 24 25 import java.util.List ; 27 28 import org.apache.poi.hssf.model.Workbook; 30 31 37 public class LessThanPtg 38 extends OperationPtg 39 { 40 41 public final static int SIZE = 1; 42 43 44 public final static byte sid = 0x09; 45 46 47 private final static String LESSTHAN = "<"; 48 49 52 public LessThanPtg() 53 { 54 } 56 57 62 public LessThanPtg(byte [] data, int offset) 63 { 64 } 66 67 72 public void writeBytes(byte[] array, int offset) 73 { 74 array[ offset + 0 ] = sid; 75 } 76 77 81 public int getSize() 82 { 83 return SIZE; 84 } 85 86 90 public int getType() 91 { 92 return TYPE_BINARY; 93 } 94 95 99 public int getNumberOfOperands() 100 { 101 return 2; 102 } 103 104 108 public String toFormulaString(Workbook book) 109 { 110 return this.LESSTHAN; 111 } 112 113 118 public String toFormulaString(String [] operands) 119 { 120 StringBuffer buffer = new StringBuffer (); 121 buffer.append(operands[ 0 ]); 122 buffer.append(this.LESSTHAN); 123 buffer.append(operands[ 1 ]); 124 return buffer.toString(); 125 } 126 127 131 public byte getDefaultOperandClass() 132 { 133 return Ptg.CLASS_VALUE; 134 } 135 136 140 public Object clone() 141 { 142 return new LessThanPtg(); 143 } 144 145 } 146 | Popular Tags |