1 22 23 24 package org.xquark.xquery.parser; 25 26 import java.math.BigDecimal ; 27 28 import org.xquark.xquery.typing.TypeException; 29 30 31 public class ValueDecimal extends Value implements Cloneable { 32 private static final String RCSRevision = "$Revision: 1.7 $"; 33 private static final String RCSName = "$Name: $"; 34 35 36 40 public void accept(ParserVisitor visitor) throws XQueryException { 41 visitor.visit(this); 42 } 43 44 48 public ValueDecimal( String value, XQueryModule parentModule) throws TypeException, XQueryException { 49 super(value); 50 setValue(value); 51 setParentModule(parentModule); 52 if (parentModule != null && parentModule.getStaticContext().getTypeVisitor() != null) 53 accept(parentModule.getStaticContext().getTypeVisitor()); 54 } 55 56 60 public BigDecimal getDecimalValue() { return new BigDecimal (value);} 61 public Object getObjectValue() { return getDecimalValue(); } 62 public void setValue(String value) throws XQueryException { 63 this.value = value; 64 } 65 public void setValue(BigDecimal value) throws XQueryException { 66 setValue(value.toString()); 67 } 68 69 } 70 | Popular Tags |