jsynoptic.parser
Class NodeForPower

java.lang.Object
  extended by jsynoptic.parser.SimpleNode
      extended by jsynoptic.parser.ExpressionNode
          extended by jsynoptic.parser.NodeForPower
All Implemented Interfaces:
java.lang.Cloneable, Node

public class NodeForPower
extends ExpressionNode


Field Summary
 
Fields inherited from class jsynoptic.parser.SimpleNode
children, id, parent, parser
 
Constructor Summary
NodeForPower(ExpressionParser p, int id)
           
NodeForPower(int id)
           
 
Method Summary
 java.lang.Number evaluate()
          Evaluate the subtree under this node and return the computation result as a number
static double powDouble(double a, long b)
           
static long powLong(long a, long b)
           
 
Methods inherited from class jsynoptic.parser.ExpressionNode
clone, getVariables
 
Methods inherited from class jsynoptic.parser.SimpleNode
dump, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent, toString, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NodeForPower

public NodeForPower(int id)

NodeForPower

public NodeForPower(ExpressionParser p,
                    int id)
Method Detail

evaluate

public java.lang.Number evaluate()
Description copied from class: ExpressionNode
Evaluate the subtree under this node and return the computation result as a number

Specified by:
evaluate in class ExpressionNode

powLong

public static long powLong(long a,
                           long b)

powDouble

public static double powDouble(double a,
                               long b)