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.
-
MathMLExpression()
- Constructs a MathML expression.
-
addArgument(Object)
- Adds an argument to this expression.
-
evaluate()
- Evaluates this expression.
-
getArgument(int)
- Returns an argument from this expression.
-
getOperation()
- Returns the operation to be applied to the arguments.
-
length()
- Returns the number of arguments.
-
setOperation(String)
- Set the operation to be applied to the arguments.
-
substitute(String, Object)
- Substitutes a value for a variable in this expression.
MathMLExpression
public MathMLExpression()
- Constructs a MathML expression.
setOperation
public void setOperation(String op)
- Set the operation to be applied to the arguments.
getOperation
public String getOperation()
- Returns the operation to be applied to the arguments.
addArgument
public void addArgument(Object obj)
- Adds an argument to this expression.
getArgument
public Object getArgument(int n)
- Returns an argument from this expression.
length
public int length()
- Returns the number of arguments.
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
evaluate
public Object evaluate()
- Evaluates this expression.
All Packages Class Hierarchy This Package Previous Next Index