1 package com.calipso.reportgenerator.reportcalculator.arithmetic; 2 3 import com.calipso.reportgenerator.reportcalculator.arithmetic.ArithmeticExpression; 4 import com.calipso.reportgenerator.reportcalculator.arithmetic.ConstantArithmeticExp; 5 6 import java.io.Serializable ; 7 8 9 12 13 public abstract class ValueArithmeticExp extends ArithmeticExpression implements Serializable { 14 15 21 public static ArithmeticExpression newValueExpFrom(String token) { 22 if (token.charAt(0) == '#') { 23 return new VariableArithmeticExp(token.substring(1, token.length())); 24 } else { 25 return new ConstantArithmeticExp(Float.valueOf(token).floatValue()); 26 } 27 } 28 } 29 | Popular Tags |