org.jacorb.idl
Class ConstExprEvaluator

java.lang.Object
  extended by org.jacorb.idl.ConstExprEvaluator

public class ConstExprEvaluator
extends Object

Based on the MathEvaluator class by The-Son LAI, Lts@writeme.com Expression evaluator for IDL constant expression Supports the following functions: +, -, *, /, ^, %, ^, | , <<, >>
When the getValue() is called, a Double object is returned. If it returns null, an error occured.

Version:
$Id: ConstExprEvaluator.java,v 1.9 2011-09-21 12:07:08 nick.cross Exp $
Author:
Gerald Brose, The-Son LAI Lts@writeme.com

Nested Class Summary
protected  class ConstExprEvaluator.Node
           
protected static class ConstExprEvaluator.Operator
           
 
Constructor Summary
ConstExprEvaluator(String s)
          creates a ConstExprEvaluator and assign the expression string.
 
Method Summary
 Double getValue()
          evaluates and returns the value of the expression
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstExprEvaluator

public ConstExprEvaluator(String s)
creates a ConstExprEvaluator and assign the expression string.

Method Detail

getValue

public Double getValue()
evaluates and returns the value of the expression



Copyright © 2012 JacORB. All Rights Reserved.