All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class JSci.io.MathMLExpression

java.lang.Object
   |
   +----JSci.io.MathMLExpression

public final class MathMLExpression
extends Object
The MathMLExpression class is used by the MathMLParser to encapsulate math expressions described by the <apply> tag.


Constructor Index

 o MathMLExpression()
Constructs a MathML expression.

Method Index

 o addArgument(Object)
Adds an argument to this expression.
 o evaluate()
Evaluates this expression.
 o getArgument(int)
Returns an argument from this expression.
 o getOperation()
Returns the operation to be applied to the arguments.
 o length()
Returns the number of arguments.
 o setOperation(String)
Set the operation to be applied to the arguments.
 o substitute(String, Object)
Substitutes a value for a variable in this expression.

Constructors

 o MathMLExpression
 public MathMLExpression()
Constructs a MathML expression.

Methods

 o setOperation
 public void setOperation(String op)
Set the operation to be applied to the arguments.

 o getOperation
 public String getOperation()
Returns the operation to be applied to the arguments.

 o addArgument
 public void addArgument(Object obj)
Adds an argument to this expression.

 o getArgument
 public Object getArgument(int n)
Returns an argument from this expression.

 o length
 public int length()
Returns the number of arguments.

 o substitute
 public MathMLExpression substitute(String var,
                                    Object value)
Substitutes a value for a variable in this expression.

Parameters:
var - the variable to substitute for
value - the value of the variable
Returns:
the expression after substitution
 o evaluate
 public Object evaluate()
Evaluates this expression.


All Packages  Class Hierarchy  This Package  Previous  Next  Index