1 28 29 package com.caucho.db.sql; 30 31 import java.sql.SQLException ; 32 import java.util.ArrayList ; 33 34 class NumberExpr extends Expr { 35 static Expr create(String lexeme) 36 throws SQLException  37 { 38 if (lexeme.indexOf('.') >= 0 || 39 lexeme.indexOf('e') >= 0 || 40 lexeme.indexOf('E') >= 0) 41 return new DoubleExpr(Double.parseDouble(lexeme)); 42 else { 43 long value = Long.parseLong(lexeme); 44 45 return new LongExpr(value); 46 } 47 } 48 49 private NumberExpr() {} 50 51 54 public long subCost(ArrayList <FromItem> fromList) 55 { 56 return 0; 57 } 58 } 59 | Popular Tags |