1 61 62 63 package org.jaxen.expr; 64 65 import org.jaxen.Context; 66 67 68 class DefaultNumberExpr extends DefaultExpr implements NumberExpr 69 { 70 private Number number; 71 72 DefaultNumberExpr( Number number ) 73 { 74 this.number = number; 75 } 76 77 public Number getNumber() 78 { 79 return this.number; 80 } 81 82 public String toString() 83 { 84 return "[(DefaultNumberExpr): " + getNumber() + "]"; 85 } 86 87 public String getText() 88 { 89 return getNumber().toString(); 90 } 91 92 public Object evaluate( Context context ) 93 { 94 return getNumber(); 95 } 96 97 public void accept( Visitor visitor ) 98 { 99 visitor.visit( this ); 100 } 101 } 102 | Popular Tags |