1 package com.genimen.djeneric.tools.generator.core.nodes; 2 3 import com.genimen.djeneric.tools.generator.core.DjentelParserEngine; 4 import com.genimen.djeneric.tools.generator.core.SimpleNode; 5 import com.genimen.djeneric.tools.generator.core.util.ParseContext; 6 7 public class IntegerNode extends SimpleNode implements ValueExpression 8 { 9 Integer _value; 10 11 public IntegerNode(int i) 12 { 13 super(i); 14 } 15 16 public IntegerNode(DjentelParserEngine p, int i) 17 { 18 super(p, i); 19 } 20 21 public String getName() 22 { 23 return toString(); 24 } 25 26 public String toString() 27 { 28 return String.valueOf(_value.intValue()); 29 } 30 31 public void setValue(int value) 32 { 33 _value = new Integer (value); 34 } 35 36 public Object getValue(ParseContext context) 37 { 38 return _value; 39 } 40 41 } | Popular Tags |