1 30 package com.genimen.djeneric.tools.scriptengine.core.nodes; 31 32 import java.util.HashMap ; 33 34 import com.genimen.djeneric.tools.scriptengine.core.DjScriptParserEngine; 35 import com.genimen.djeneric.tools.scriptengine.core.SimpleNode; 36 import com.genimen.djeneric.tools.scriptengine.core.util.DjScriptCompileTimeScope; 37 import com.genimen.djeneric.tools.scriptengine.core.util.DjScriptExecutionTimeScope; 38 39 public class FloatNode extends SimpleNode implements ValueExpression 40 { 41 Float _value; 42 43 public FloatNode(int i) 44 { 45 super(i); 46 } 47 48 public FloatNode(DjScriptParserEngine p, int i) 49 { 50 super(p, i); 51 } 52 53 public String getName() 54 { 55 return toString(); 56 } 57 58 public String toString() 59 { 60 return String.valueOf(_value.floatValue()); 61 } 62 63 public void setValue(float value) 64 { 65 _value = new Float (value); 66 } 67 68 public Object getValue(DjScriptExecutionTimeScope context) 69 { 70 return _value; 71 } 72 73 public void translateOql(DjScriptExecutionTimeScope ctxt, StringBuffer result, HashMap parameters) 74 { 75 result.append(_value); 76 } 77 78 public String getValidatedTypeName(DjScriptCompileTimeScope context) 79 { 80 return Float .class.getName(); 81 } 82 } | Popular Tags |