1 package com.daffodilwoods.daffodildb.server.sql99.token; 2 3 import com.daffodilwoods.daffodildb.utils.field.*; 4 5 public class signedinteger implements com.daffodilwoods.daffodildb.utils.parser.StatementExecuter { 6 public digit[] _Repdigit0; 7 public sign _Optsign1; 8 9 private FieldBase fieldBase; 10 public Object run(Object object) throws com.daffodilwoods.database.resource.DException { 11 String unsignedInteger = ""; 12 if (fieldBase == null) { 13 for (int i = 0; i < _Repdigit0.length; i++) { 14 String aa = (String ) _Repdigit0[i].run(object); 15 unsignedInteger += aa.trim(); 16 } 17 18 if (_Optsign1 != null) { 19 String sign = (String ) _Optsign1.run(null); 20 if (sign.trim().equalsIgnoreCase("-")) { 21 unsignedInteger = sign + unsignedInteger; 22 } 23 } 24 fieldBase = new FieldLiteral(unsignedInteger, -1); 25 } 26 return fieldBase; 27 } 28 29 public String toString() { 30 StringBuffer sb = new StringBuffer (); 31 sb.append(" "); 32 if (_Optsign1 != null) { 33 sb.append(_Optsign1); 34 } 35 for (int i = 0; i < _Repdigit0.length; i++) { 36 sb.append(_Repdigit0[i]); 37 } 38 return sb.toString(); 39 } 40 41 public Object clone() throws CloneNotSupportedException { 42 signedinteger tempClass = new signedinteger(); 43 digit[] temp_Repdigit0 = new digit[_Repdigit0.length]; 44 for (int i = 0; i < _Repdigit0.length; i++) { 45 temp_Repdigit0[i] = (digit) _Repdigit0[i].clone(); 46 } 47 tempClass._Repdigit0 = temp_Repdigit0; 48 if (_Optsign1 != null) { 49 tempClass._Optsign1 = (sign) _Optsign1.clone(); 50 } 51 return tempClass; 52 } 53 54 62 63 } 64 | Popular Tags |