com.singularsys.aa
Class SimpleExpr

java.lang.Object
  extended by com.singularsys.aa.SimpleExpr
All Implemented Interfaces:
Expression
Direct Known Subclasses:
LinearExpr, PolynomialExpr, UntypifiedExpr

public class SimpleExpr
extends java.lang.Object
implements Expression

Simple implementation of the Expression interface. This class serves to supply the basic functionality required for all expression types.

Author:
nathan

Field Summary
protected  java.util.Vector variables
          Vector of all variable names occuring in the expression
 
Constructor Summary
SimpleExpr()
          Creates a new instance of SimpleExpression
 
Method Summary
 java.lang.Object getValue(java.util.Hashtable varValues)
          Returns null.
 java.lang.Object getValue(java.lang.Object[] varValues)
          Returns null.
 java.util.Vector getVariables()
          Returns variable name Vector.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

variables

protected java.util.Vector variables
Vector of all variable names occuring in the expression

Constructor Detail

SimpleExpr

public SimpleExpr()
Creates a new instance of SimpleExpression

Method Detail

getVariables

public java.util.Vector getVariables()
Returns variable name Vector.

Specified by:
getVariables in interface Expression
Returns:
a Vector of variable names used in this expression.

getValue

public java.lang.Object getValue(java.lang.Object[] varValues)
Returns null.


getValue

public java.lang.Object getValue(java.util.Hashtable varValues)
                          throws java.lang.Exception
Returns null.

Specified by:
getValue in interface Expression
Parameters:
varValues - A hastable containing the variable names as keys, and the values as objects.
Returns:
The value of this expression.
Throws:
java.lang.Exception