1 package com.genimen.djeneric.repository.oql.core.nodes; 2 3 import java.util.HashMap ; 4 5 import com.genimen.djeneric.repository.oql.core.DjOqlParserEngine; 6 import com.genimen.djeneric.repository.oql.core.SimpleNode; 7 8 public class FloatNode extends SimpleNode implements ValueExpression 9 { 10 Float _value; 11 12 public FloatNode(int i) 13 { 14 super(i); 15 } 16 17 public FloatNode(DjOqlParserEngine p, int i) 18 { 19 super(p, i); 20 } 21 22 public String getName() 23 { 24 return toString(); 25 } 26 27 public String toString() 28 { 29 return String.valueOf(_value.floatValue()); 30 } 31 32 public void setValue(float value) 33 { 34 _value = new Float (value); 35 } 36 37 public void translate(StringBuffer result, HashMap path2AliasMapping) 38 { 39 appendOpenBrackets(result); 40 result.append(_value); 41 appendCloseBrackets(result); 42 } 43 44 public Object getValue(MatchingContext context) 45 { 46 return _value; 47 } 48 49 } | Popular Tags |